Documentation ¶
Index ¶
- Variables
- func GetAndServe(registerFunc func(*grpc.Server), options ServeOptions) error
- func GetAndServeWithHTTP(registerFunc func(*grpc.Server), ...) error
- func Serve(registerFunc func(*grpc.Server), options ServeOptions, serveEnv ServeEnv) (retErr error)
- func ServeWithHTTP(registerFunc func(*grpc.Server), ...) (retErr error)
- type ServeEnv
- type ServeOptions
- type ServeWithHTTPOptions
- type ServerFinished
- type ServerStarted
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GetAndServe ¶
func GetAndServe( registerFunc func(*grpc.Server), options ServeOptions, ) error
GetAndServe is GetServeEnv with Serve.
func GetAndServeWithHTTP ¶
func GetAndServeWithHTTP( registerFunc func(*grpc.Server), httpRegisterFunc func(context.Context, *runtime.ServeMux, *grpc.ClientConn) error, options ServeWithHTTPOptions, ) error
GetAndServeWithHTTP is GetServeEnv and GetHandlerEnv with ServeWithHTTP.
Types ¶
type ServeEnv ¶
type ServeEnv struct { // Default is 7070. GRPCPort uint16 `env:"GRPC_PORT,default=7070"` }
ServeEnv are environment variables for serving.
type ServeOptions ¶
type ServeOptions struct {
Version *protoversion.Version
}
ServeOptions represent optional fields for serving.
type ServeWithHTTPOptions ¶
type ServeWithHTTPOptions struct { ServeOptions HTTPHandlerModifier func(http.Handler) (http.Handler, error) }
ServeWithHTTPOptions represent optional fields for serving.
type ServerFinished ¶
type ServerFinished struct { Error string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"` Duration *google_protobuf.Duration `protobuf:"bytes,2,opt,name=duration" json:"duration,omitempty"` }
func (*ServerFinished) Descriptor ¶
func (*ServerFinished) Descriptor() ([]byte, []int)
func (*ServerFinished) GetDuration ¶
func (m *ServerFinished) GetDuration() *google_protobuf.Duration
func (*ServerFinished) GetError ¶
func (m *ServerFinished) GetError() string
func (*ServerFinished) ProtoMessage ¶
func (*ServerFinished) ProtoMessage()
func (*ServerFinished) Reset ¶
func (m *ServerFinished) Reset()
func (*ServerFinished) String ¶
func (m *ServerFinished) String() string
type ServerStarted ¶
type ServerStarted struct { Port uint32 `protobuf:"varint,1,opt,name=port" json:"port,omitempty"` HttpPort uint32 `protobuf:"varint,2,opt,name=http_port,json=httpPort" json:"http_port,omitempty"` }
func (*ServerStarted) Descriptor ¶
func (*ServerStarted) Descriptor() ([]byte, []int)
func (*ServerStarted) GetHttpPort ¶
func (m *ServerStarted) GetHttpPort() uint32
func (*ServerStarted) GetPort ¶
func (m *ServerStarted) GetPort() uint32
func (*ServerStarted) ProtoMessage ¶
func (*ServerStarted) ProtoMessage()
func (*ServerStarted) Reset ¶
func (m *ServerStarted) Reset()
func (*ServerStarted) String ¶
func (m *ServerStarted) String() string
Click to show internal directories.
Click to hide internal directories.