Documentation ¶
Index ¶
- func InterceptorLogger(l zerolog.Logger) grpc_logging.Logger
- func NewGRPCServer(id string, cs *consul.Consul, grpcOpts ...grpc.ServerOption) (*grpc.Server, error)
- type StorageServer
- func (st *StorageServer) GetHost() string
- func (st *StorageServer) GetID() string
- func (st *StorageServer) GetMetadata() map[string]string
- func (st *StorageServer) GetName() string
- func (st *StorageServer) GetPort() string
- func (st *StorageServer) ShutdownGRPC() error
- func (st *StorageServer) ShutdownServer() error
- func (st *StorageServer) StartServer(address string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InterceptorLogger ¶
func InterceptorLogger(l zerolog.Logger) grpc_logging.Logger
InterceptorLogger adapts zerolog logger to interceptor logger.
func NewGRPCServer ¶
Types ¶
type StorageServer ¶
type StorageServer struct { Name string ID uuid.UUID Hostname string // contains filtered or unexported fields }
func New ¶
func New(config configuration.Configuration) (*StorageServer, error)
func (*StorageServer) GetHost ¶
func (st *StorageServer) GetHost() string
func (*StorageServer) GetID ¶
func (st *StorageServer) GetID() string
func (*StorageServer) GetMetadata ¶
func (st *StorageServer) GetMetadata() map[string]string
func (*StorageServer) GetName ¶
func (st *StorageServer) GetName() string
func (*StorageServer) GetPort ¶
func (st *StorageServer) GetPort() string
func (*StorageServer) ShutdownGRPC ¶
func (st *StorageServer) ShutdownGRPC() error
func (*StorageServer) ShutdownServer ¶
func (st *StorageServer) ShutdownServer() error
func (*StorageServer) StartServer ¶
func (st *StorageServer) StartServer(address string) error
Click to show internal directories.
Click to hide internal directories.