Documentation
¶
Overview ¶
Copyright (c) 2020 rookie-ninja
Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.
Copyright (c) 2020 rookie-ninja ¶
Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.
Copyright (c) 2020 rookie-ninja ¶
Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.
Copyright (c) 2020 rookie-ninja ¶
Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.
Copyright (c) 2020 rookie-ninja ¶
Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.
Copyright (c) 2020 rookie-ninja ¶
Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.
Index ¶
- func NewGRpcEntries(path string, factory *rk_query.EventFactory, logger *zap.Logger) map[string]*GRpcEntry
- func OutgoingHeaderMatcher(key string) (string, bool)
- type CommonServiceGRpc
- func (service *CommonServiceGRpc) APIS(ctx context.Context, request *rk_grpc_common_v1.ListAPIRequest) (*rk_grpc_common_v1.ListAPIResponse, error)
- func (service *CommonServiceGRpc) Config(ctx context.Context, request *rk_grpc_common_v1.DumpConfigRequest) (*rk_grpc_common_v1.DumpConfigResponse, error)
- func (service *CommonServiceGRpc) GC(ctx context.Context, request *rk_grpc_common_v1.GCRequest) (*rk_grpc_common_v1.GCResponse, error)
- func (service *CommonServiceGRpc) Healthy(ctx context.Context, request *rk_grpc_common_v1.HealthyRequest) (*rk_grpc_common_v1.HealthyResponse, error)
- func (service *CommonServiceGRpc) Info(ctx context.Context, request *rk_grpc_common_v1.InfoRequest) (*rk_grpc_common_v1.InfoResponse, error)
- func (service *CommonServiceGRpc) Req(ctx context.Context, request *rk_grpc_common_v1.ReqRequest) (*rk_grpc_common_v1.ReqResponse, error)
- func (service *CommonServiceGRpc) Sys(ctx context.Context, request *rk_grpc_common_v1.SysRequest) (*rk_grpc_common_v1.SysResponse, error)
- type GRpcEntry
- func (entry *GRpcEntry) AddGRpcRegFuncs(funcs ...RegFuncGRpc)
- func (entry *GRpcEntry) AddGWRegFuncs(funcs ...regFuncGW)
- func (entry *GRpcEntry) AddServerOptions(opts ...grpc.ServerOption)
- func (entry *GRpcEntry) AddStreamInterceptors(inter ...grpc.StreamServerInterceptor)
- func (entry *GRpcEntry) AddUnaryInterceptors(inter ...grpc.UnaryServerInterceptor)
- func (entry *GRpcEntry) Bootstrap(event rk_query.Event)
- func (entry *GRpcEntry) GetGWEntry() *gwEntry
- func (entry *GRpcEntry) GetListener() net.Listener
- func (entry *GRpcEntry) GetName() string
- func (entry *GRpcEntry) GetPort() uint64
- func (entry *GRpcEntry) GetServer() *grpc.Server
- func (entry *GRpcEntry) GetType() string
- func (entry *GRpcEntry) IsGWEnabled() bool
- func (entry *GRpcEntry) IsTlsEnabled() bool
- func (entry *GRpcEntry) Shutdown(event rk_query.Event)
- func (entry *GRpcEntry) String() string
- func (entry *GRpcEntry) Wait(draining time.Duration)
- type GRpcEntryOption
- func WithCommonService(enable bool) GRpcEntryOption
- func WithGWEntry(gw *gwEntry) GRpcEntryOption
- func WithLogger(log *zap.Logger) GRpcEntryOption
- func WithName(name string) GRpcEntryOption
- func WithPort(port uint64) GRpcEntryOption
- func WithRegFuncs(funcs ...RegFuncGRpc) GRpcEntryOption
- func WithServerOptions(opts ...grpc.ServerOption) GRpcEntryOption
- func WithStreamInterceptors(opts ...grpc.StreamServerInterceptor) GRpcEntryOption
- func WithTlsEntry(tls *tlsEntry) GRpcEntryOption
- func WithUnaryInterceptors(opts ...grpc.UnaryServerInterceptor) GRpcEntryOption
- type RegFuncGRpc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGRpcEntries ¶
func OutgoingHeaderMatcher ¶ added in v1.1.2
without prefix
Types ¶
type CommonServiceGRpc ¶
type CommonServiceGRpc struct{}
func NewCommonServiceGRpc ¶
func NewCommonServiceGRpc() *CommonServiceGRpc
func (*CommonServiceGRpc) APIS ¶ added in v1.1.2
func (service *CommonServiceGRpc) APIS(ctx context.Context, request *rk_grpc_common_v1.ListAPIRequest) (*rk_grpc_common_v1.ListAPIResponse, error)
API Stub
func (*CommonServiceGRpc) Config ¶ added in v1.1.2
func (service *CommonServiceGRpc) Config(ctx context.Context, request *rk_grpc_common_v1.DumpConfigRequest) (*rk_grpc_common_v1.DumpConfigResponse, error)
DumpConfig Stub
func (*CommonServiceGRpc) GC ¶
func (service *CommonServiceGRpc) GC(ctx context.Context, request *rk_grpc_common_v1.GCRequest) (*rk_grpc_common_v1.GCResponse, error)
GC Stub
func (*CommonServiceGRpc) Healthy ¶
func (service *CommonServiceGRpc) Healthy(ctx context.Context, request *rk_grpc_common_v1.HealthyRequest) (*rk_grpc_common_v1.HealthyResponse, error)
Healthy Stub
func (*CommonServiceGRpc) Info ¶
func (service *CommonServiceGRpc) Info(ctx context.Context, request *rk_grpc_common_v1.InfoRequest) (*rk_grpc_common_v1.InfoResponse, error)
Info Stub
type GRpcEntry ¶
type GRpcEntry struct {
// contains filtered or unexported fields
}
func NewGRpcEntry ¶
func NewGRpcEntry(opts ...GRpcEntryOption) *GRpcEntry
func (*GRpcEntry) AddGRpcRegFuncs ¶
func (entry *GRpcEntry) AddGRpcRegFuncs(funcs ...RegFuncGRpc)
func (*GRpcEntry) AddGWRegFuncs ¶
func (entry *GRpcEntry) AddGWRegFuncs(funcs ...regFuncGW)
func (*GRpcEntry) AddServerOptions ¶
func (entry *GRpcEntry) AddServerOptions(opts ...grpc.ServerOption)
func (*GRpcEntry) AddStreamInterceptors ¶
func (entry *GRpcEntry) AddStreamInterceptors(inter ...grpc.StreamServerInterceptor)
func (*GRpcEntry) AddUnaryInterceptors ¶
func (entry *GRpcEntry) AddUnaryInterceptors(inter ...grpc.UnaryServerInterceptor)
func (*GRpcEntry) GetGWEntry ¶
func (entry *GRpcEntry) GetGWEntry() *gwEntry
func (*GRpcEntry) GetListener ¶
func (*GRpcEntry) IsGWEnabled ¶ added in v1.1.1
func (*GRpcEntry) IsTlsEnabled ¶ added in v1.1.1
type GRpcEntryOption ¶
type GRpcEntryOption func(*GRpcEntry)
func WithCommonService ¶
func WithCommonService(enable bool) GRpcEntryOption
func WithGWEntry ¶
func WithGWEntry(gw *gwEntry) GRpcEntryOption
func WithLogger ¶
func WithLogger(log *zap.Logger) GRpcEntryOption
func WithName ¶
func WithName(name string) GRpcEntryOption
func WithPort ¶
func WithPort(port uint64) GRpcEntryOption
func WithRegFuncs ¶
func WithRegFuncs(funcs ...RegFuncGRpc) GRpcEntryOption
func WithServerOptions ¶
func WithServerOptions(opts ...grpc.ServerOption) GRpcEntryOption
func WithStreamInterceptors ¶
func WithStreamInterceptors(opts ...grpc.StreamServerInterceptor) GRpcEntryOption
func WithTlsEntry ¶
func WithTlsEntry(tls *tlsEntry) GRpcEntryOption
func WithUnaryInterceptors ¶
func WithUnaryInterceptors(opts ...grpc.UnaryServerInterceptor) GRpcEntryOption