Documentation ¶
Index ¶
Constants ¶
const UnixSocket = "/tmp/test.sock"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option overrides behavior of Server.
func WithGracePeriod ¶
WithGracePeriod sets shutdown grace period for gRPC server. Server waits connections to drain for specified amount of time.
func WithListen ¶
WithListen sets address to listen for gRPC server. Server accepts incoming connections on given address.
func WithNetwork ¶ added in v0.13.0
WithNetwork sets network to listen for gRPC server e.g tcp, udp or unix.
func WithTLSConfig ¶
WithTLSConfig sets TLS configuration for gRPC server.
type ReadWriteStoreServer ¶ added in v0.11.0
type ReadWriteStoreServer interface { storepb.StoreServer storepb.WriteableStoreServer }
ReadWriteStoreServer is a StoreServer and a WriteableStoreServer.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
A Server defines parameters to serve RPC requests, a wrapper around grpc.Server.
func New ¶
func New(logger log.Logger, reg prometheus.Registerer, tracer opentracing.Tracer, comp component.Component, probe *prober.GRPCProbe, storeSrv storepb.StoreServer, opts ...Option) *Server
New creates a new Server.
func NewReadWrite ¶ added in v0.11.0
func NewReadWrite(logger log.Logger, reg prometheus.Registerer, tracer opentracing.Tracer, comp component.Component, probe *prober.GRPCProbe, storeSrv ReadWriteStoreServer, opts ...Option) *Server
NewReadWrite creates a new server that can be written to.
func (*Server) ListenAndServe ¶
ListenAndServe listens on the TCP network address and handles requests on incoming connections.