mirror of
https://github.com/eolinker/apinto
synced 2025-11-03 02:53:33 +08:00
fix all CheckSkill of the output driver
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package fileoutput
|
package fileoutput
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/eolinker/apinto/output"
|
||||||
file_transport "github.com/eolinker/apinto/output/file-transport"
|
file_transport "github.com/eolinker/apinto/output/file-transport"
|
||||||
"github.com/eolinker/eosc"
|
"github.com/eolinker/eosc"
|
||||||
"github.com/eolinker/eosc/formatter"
|
"github.com/eolinker/eosc/formatter"
|
||||||
@@ -72,5 +73,5 @@ func (a *FileOutput) Stop() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (a *FileOutput) CheckSkill(skill string) bool {
|
func (a *FileOutput) CheckSkill(skill string) bool {
|
||||||
return false
|
return output.CheckSkill(skill)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package httpoutput
|
package httpoutput
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/eolinker/apinto/output"
|
||||||
http_transport "github.com/eolinker/apinto/output/http-transport"
|
http_transport "github.com/eolinker/apinto/output/http-transport"
|
||||||
"github.com/eolinker/eosc"
|
"github.com/eolinker/eosc"
|
||||||
"github.com/eolinker/eosc/formatter"
|
"github.com/eolinker/eosc/formatter"
|
||||||
@@ -80,5 +81,5 @@ func (h *HttpOutput) Stop() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (h *HttpOutput) CheckSkill(skill string) bool {
|
func (h *HttpOutput) CheckSkill(skill string) bool {
|
||||||
return false
|
return output.CheckSkill(skill)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package kafka
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"github.com/Shopify/sarama"
|
"github.com/Shopify/sarama"
|
||||||
|
"github.com/eolinker/apinto/output"
|
||||||
"github.com/eolinker/eosc"
|
"github.com/eolinker/eosc"
|
||||||
"github.com/eolinker/eosc/formatter"
|
"github.com/eolinker/eosc/formatter"
|
||||||
"github.com/eolinker/eosc/log"
|
"github.com/eolinker/eosc/log"
|
||||||
@@ -85,7 +86,7 @@ func (o *Output) Stop() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *Output) CheckSkill(skill string) bool {
|
func (o *Output) CheckSkill(skill string) bool {
|
||||||
return false
|
return output.CheckSkill(skill)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *Output) write(msg *sarama.ProducerMessage) {
|
func (o *Output) write(msg *sarama.ProducerMessage) {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package nsq
|
package nsq
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/eolinker/apinto/output"
|
||||||
"github.com/eolinker/eosc"
|
"github.com/eolinker/eosc"
|
||||||
"github.com/eolinker/eosc/formatter"
|
"github.com/eolinker/eosc/formatter"
|
||||||
"sync"
|
"sync"
|
||||||
@@ -69,7 +70,7 @@ func (n *NsqOutput) Stop() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (n *NsqOutput) CheckSkill(skill string) bool {
|
func (n *NsqOutput) CheckSkill(skill string) bool {
|
||||||
return false
|
return output.CheckSkill(skill)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n *NsqOutput) Output(entry eosc.IEntry) error {
|
func (n *NsqOutput) Output(entry eosc.IEntry) error {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
package syslog
|
package syslog
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/eolinker/apinto/output"
|
||||||
"github.com/eolinker/eosc"
|
"github.com/eolinker/eosc"
|
||||||
"github.com/eolinker/eosc/formatter"
|
"github.com/eolinker/eosc/formatter"
|
||||||
sys "log/syslog"
|
sys "log/syslog"
|
||||||
@@ -87,7 +88,7 @@ func (s *SysWriter) Reset(conf interface{}, workers map[eosc.RequireId]interface
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *SysWriter) CheckSkill(skill string) bool {
|
func (s *SysWriter) CheckSkill(skill string) bool {
|
||||||
return false
|
return output.CheckSkill(skill)
|
||||||
}
|
}
|
||||||
|
|
||||||
func newSysWriter(conf *Config, tag string) (*sys.Writer, error) {
|
func newSysWriter(conf *Config, tag string) (*sys.Writer, error) {
|
||||||
|
|||||||
@@ -2,6 +2,13 @@ package output
|
|||||||
|
|
||||||
import "github.com/eolinker/eosc"
|
import "github.com/eolinker/eosc"
|
||||||
|
|
||||||
|
const OutputSkill = "github.com/eolinker/apinto/http-entry.http-entry.IOutput"
|
||||||
|
|
||||||
type IEntryOutput interface {
|
type IEntryOutput interface {
|
||||||
Output(entry eosc.IEntry) error
|
Output(entry eosc.IEntry) error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//CheckSkill 检查能力
|
||||||
|
func CheckSkill(skill string) bool {
|
||||||
|
return skill == OutputSkill
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user