grpc

package
v1.4.8 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InjectClient

func InjectClient(injection func(conn *grpc.ClientConn), ops ...Option) error

InjectClient inject grpc client to proto module

Types

type Option

type Option func(*config)

Option to grpc config

func WithAddr

func WithAddr(addr string) Option

WithAddr returns address option

func WithTLSConfig

func WithTLSConfig(conf *tls.Config) Option

WithTLSConfig returns tls config option

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server struct

func NewServer

func NewServer(ops ...Option) (*Server, error)

NewServer new grpc server with options

func (*Server) Ready

func (s *Server) Ready() <-chan struct{}

Ready Returns a channel that will be closed when etcd is ready

func (*Server) Start

func (s *Server) Start(ctx context.Context)

Start grpc server

func (*Server) Stop

func (s *Server) Stop()

Stop etcd server

func (*Server) Stopped

func (s *Server) Stopped() <-chan struct{}

Stopped Returns a channel that will be closed when etcd is stopped

Jump to

Keyboard shortcuts

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