Documentation
¶
Index ¶
- Constants
- func NewReply() *pb.Reply
- type Config
- type GRPCd
- func (grpcd *GRPCd) Close() error
- func (grpcd *GRPCd) Open() error
- func (grpcd *GRPCd) SendToInfluxdb(ctx context.Context, lines *pb.InfluxdbMsg) (*pb.Reply, error)
- func (grpcd *GRPCd) SendToInfluxdbStream(stream pb.SProxy_SendToInfluxdbStreamServer) error
- func (grpcd *GRPCd) SendToKafka(ctx context.Context, msg *pb.KafkaMsg) (*pb.Reply, error)
- func (grpcd *GRPCd) SendToKafkaStream(stream pb.SProxy_SendToKafkaStreamServer) error
- func (grpcd *GRPCd) SetInfluxdbService(s *influxdb.Service)
- func (grpcd *GRPCd) SetKafkaService(s *kafka.Service)
- func (grpcd *GRPCd) WithLogger(logger *zap.Logger)
- type Pool
- type Reply
- type Statistics
Constants ¶
View Source
const ( DefaultListenType = "tcp" DefaultListenAddr = ":1408" DefaultMonitorInterval = util.Duration(time.Second * 10) )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
ListenType string `yaml:"ListenType,omitempty" mapstructure:"ListenType,omitempty"`
ListenAddr string `yaml:"ListenAddr,omitempty" mapstructure:"ListenAddr,omitempty"`
MonitorInterval util.Duration `yaml:"MonitorInterval,omitempty" mapstructure:"MonitorInterval,omitempty"`
}
func (Config) GetListenAddr ¶
func (Config) GetListenType ¶
type GRPCd ¶
type GRPCd struct {
pb.UnimplementedSProxyServer
Config Config
Logger *zap.Logger
Closing chan struct{}
Closed chan struct{}
// contains filtered or unexported fields
}
func (*GRPCd) SendToInfluxdb ¶
func (*GRPCd) SendToInfluxdbStream ¶
func (grpcd *GRPCd) SendToInfluxdbStream(stream pb.SProxy_SendToInfluxdbStreamServer) error
func (*GRPCd) SendToKafka ¶
func (*GRPCd) SendToKafkaStream ¶
func (grpcd *GRPCd) SendToKafkaStream(stream pb.SProxy_SendToKafkaStreamServer) error
func (*GRPCd) SetInfluxdbService ¶
func (*GRPCd) SetKafkaService ¶
func (*GRPCd) WithLogger ¶
type Reply ¶
type Reply struct {
// contains filtered or unexported fields
}
func GetReplyWrapper ¶
func GetReplyWrapper() *Reply
func (*Reply) AddSuccess ¶
Click to show internal directories.
Click to hide internal directories.