Documentation
¶
Index ¶
- Constants
- Variables
- func ConnectionWatcher(ctx context.Context)
- func MakeHealthMsg(check *pb.HealthCheck) *pb.Health
- func MakeInternalHealthMsg(code pb.HealthStatus_Code) *pb.Health
- func MonitorHealthChan(receiver chan pb.HealthStatus_Code)
- func RegisterHealthServer(s *grpc.Server) *health.Server
- func ResetConnectionMap()
- func SetSourceDefaults(source *pb.Source)
- func TrimConnectionList()
- type ConsumerServer
- func (s *ConsumerServer) Connect(ctx context.Context, cf *pb.ConnectionConfiguration) (*pb.ConnectResponse, error)
- func (s *ConsumerServer) Consume(stream pb.Consumer_ConsumeServer) error
- func (s *ConsumerServer) Disconnect(ctx context.Context, empty *pb.Empty) (*pb.Empty, error)
- func (s *ConsumerServer) SourceStats(ctx context.Context, source *pb.Source) (*pb.SourceStats, error)
- func (s *ConsumerServer) SourceStatsGroup(ctx context.Context, sources *pb.Sources) (*pb.SourceStatsCollection, error)
- type HealthzServer
- type ProducerServer
- func (s *ProducerServer) Connect(ctx context.Context, cf *pb.ConnectionConfiguration) (*pb.ConnectResponse, error)
- func (s *ProducerServer) Disconnect(ctx context.Context, empty *pb.Empty) (*pb.Empty, error)
- func (s *ProducerServer) Publish(stream pb.Producer_PublishServer) error
- func (s *ProducerServer) PublishOne(ctx context.Context, msg *pb.Message) (*pb.MessageResponse, error)
Constants ¶
const ( EnvMaxConnectRetries = "MAX_RECONNECT_RETRIES" EnvMaxConnectDelay = "MAX_RECONNECT_DELAY" )
Variables ¶
var GetClientAddr = util.GetClientAddr
var GetClientIdentifier = util.GetClientIdentifier
var GetProcessStats = util.GetProcessStats
var NewTimestampPB = util.NewTimestampPB
var RemoveClientIdentifier = util.RemoveClientIdentifier
var SetClientIdentifier = util.SetClientIdentifier
Functions ¶
func ConnectionWatcher ¶
func MakeHealthMsg ¶
func MakeHealthMsg(check *pb.HealthCheck) *pb.Health
func MakeInternalHealthMsg ¶
func MakeInternalHealthMsg(code pb.HealthStatus_Code) *pb.Health
func MonitorHealthChan ¶
func MonitorHealthChan(receiver chan pb.HealthStatus_Code)
MonitorHealthChan monitors the health of the server and sends notifications to clients
func RegisterHealthServer ¶
RegisterHealthServer registers a health check server for use by consul and client applications
func ResetConnectionMap ¶
func ResetConnectionMap()
func SetSourceDefaults ¶
func TrimConnectionList ¶
func TrimConnectionList()
Types ¶
type ConsumerServer ¶
type ConsumerServer struct {
pb.UnimplementedConsumerServer
TLSSkipVerify bool
}
ConsumerServer consumer server struct
func (*ConsumerServer) Connect ¶
func (s *ConsumerServer) Connect(ctx context.Context, cf *pb.ConnectionConfiguration) (*pb.ConnectResponse, error)
Connect see (ProducerServer).Connect
func (*ConsumerServer) Consume ¶
func (s *ConsumerServer) Consume(stream pb.Consumer_ConsumeServer) error
Consume Receives a stream of messages (source, ack, nack) and returns a message (message, ackresponse, nackresponse)
func (*ConsumerServer) Disconnect ¶
Disconnect disconnects from the consumer server
func (*ConsumerServer) SourceStats ¶
func (s *ConsumerServer) SourceStats(ctx context.Context, source *pb.Source) (*pb.SourceStats, error)
SourceStats get stats for a specific source
func (*ConsumerServer) SourceStatsGroup ¶
func (s *ConsumerServer) SourceStatsGroup(ctx context.Context, sources *pb.Sources) (*pb.SourceStatsCollection, error)
SourceStatsGroup get stats for a group of sources
type HealthzServer ¶
type HealthzServer struct {
pb.UnimplementedHealthzServer
}
func (*HealthzServer) Check ¶
func (s *HealthzServer) Check(stream pb.Healthz_CheckServer) error
type ProducerServer ¶
type ProducerServer struct {
pb.UnimplementedProducerServer
TLSSkipVerify bool
}
ProducerServer producer server struct
func (*ProducerServer) Connect ¶
func (s *ProducerServer) Connect(ctx context.Context, cf *pb.ConnectionConfiguration) (*pb.ConnectResponse, error)
Connect to the message broker and track the connection. If a previous connection exists the client, it will not connect again.
func (*ProducerServer) Disconnect ¶
Disconnect disconnects from the producer server
func (*ProducerServer) Publish ¶
func (s *ProducerServer) Publish(stream pb.Producer_PublishServer) error
Publish sends message to the server
func (*ProducerServer) PublishOne ¶
func (s *ProducerServer) PublishOne(ctx context.Context, msg *pb.Message) (*pb.MessageResponse, error)
PublishOne send a single message to the server