Documentation ¶
Overview ¶
Package grpc implements a gRPC sentry worker.
Index ¶
Constants ¶
View Source
const ( // CfgEnabled enables the sentry grpc worker. CfgEnabled = "worker.sentry.grpc.enabled" // CfgUpstreamAddress is the grpc address of the upstream node. CfgUpstreamAddress = "worker.sentry.grpc.upstream.address" // CfgUpstreamID is the node ID of the upstream node. CfgUpstreamID = "worker.sentry.grpc.upstream.id" // CfgClientAddresses are addresses on which the gRPC endpoint is reachable. CfgClientAddresses = "worker.sentry.grpc.client.address" // CfgClientPort is the sentry node's client port. CfgClientPort = "worker.sentry.grpc.client.port" )
Variables ¶
View Source
var Flags = flag.NewFlagSet("", flag.ContinueOnError)
Flags has the configuration flags.
Functions ¶
func GetNodeAddresses ¶
GetNodeAddresses returns configured sentry node addresses.
Types ¶
type Worker ¶
Worker is a gRPC sentry node worker proxying gRPC requests to upstream node.
func (*Worker) Cleanup ¶
func (g *Worker) Cleanup()
Cleanup performs the service specific post-termination cleanup.
func (*Worker) Initialized ¶
func (g *Worker) Initialized() <-chan struct{}
Initialized returns a channel that will be closed when the worker initializes.
Click to show internal directories.
Click to hide internal directories.