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