server

package
v1.40.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvMaxConnectRetries = "MAX_RECONNECT_RETRIES"
	EnvMaxConnectDelay   = "MAX_RECONNECT_DELAY"
)

Variables

View Source
var GetClientAddr = util.GetClientAddr
View Source
var GetClientIdentifier = util.GetClientIdentifier
View Source
var GetProcessStats = util.GetProcessStats
View Source
var NewTimestampPB = util.NewTimestampPB
View Source
var RemoveClientIdentifier = util.RemoveClientIdentifier
View Source
var SetClientIdentifier = util.SetClientIdentifier

Functions

func ConnectionWatcher

func ConnectionWatcher(ctx context.Context)

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

func RegisterHealthServer(s *grpc.Server) *health.Server

RegisterHealthServer registers a health check server for use by consul and client applications

func ResetConnectionMap

func ResetConnectionMap()

func SetSourceDefaults

func SetSourceDefaults(source *pb.Source)

func TrimConnectionList

func TrimConnectionList()

Types

type ConsumerServer

type ConsumerServer struct {
	pb.UnimplementedConsumerServer
	TLSSkipVerify bool
}

ConsumerServer consumer server struct

func (*ConsumerServer) Connect

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

func (s *ConsumerServer) Disconnect(ctx context.Context, empty *pb.Empty) (*pb.Empty, error)

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

Connect to the message broker and track the connection. If a previous connection exists the client, it will not connect again.

func (*ProducerServer) Disconnect

func (s *ProducerServer) Disconnect(ctx context.Context, empty *pb.Empty) (*pb.Empty, error)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL