rk_grpc

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2020 License: MIT Imports: 34 Imported by: 6

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.

Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGRpcEntries

func NewGRpcEntries(path string, factory *rk_query.EventFactory, logger *zap.Logger) map[string]*GRpcEntry

func OutgoingHeaderMatcher added in v1.1.2

func OutgoingHeaderMatcher(key string) (string, bool)

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

func (*CommonServiceGRpc) Req added in v1.1.2

func (service *CommonServiceGRpc) Req(ctx context.Context, request *rk_grpc_common_v1.ReqRequest) (*rk_grpc_common_v1.ReqResponse, error)

Req Stub

func (*CommonServiceGRpc) Sys added in v1.1.2

func (service *CommonServiceGRpc) Sys(ctx context.Context, request *rk_grpc_common_v1.SysRequest) (*rk_grpc_common_v1.SysResponse, error)

Sys 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) Bootstrap

func (entry *GRpcEntry) Bootstrap(event rk_query.Event)

func (*GRpcEntry) GetGWEntry

func (entry *GRpcEntry) GetGWEntry() *gwEntry

func (*GRpcEntry) GetListener

func (entry *GRpcEntry) GetListener() net.Listener

func (*GRpcEntry) GetName

func (entry *GRpcEntry) GetName() string

func (*GRpcEntry) GetPort

func (entry *GRpcEntry) GetPort() uint64

func (*GRpcEntry) GetServer

func (entry *GRpcEntry) GetServer() *grpc.Server

func (*GRpcEntry) GetType added in v1.1.1

func (entry *GRpcEntry) GetType() string

func (*GRpcEntry) IsGWEnabled added in v1.1.1

func (entry *GRpcEntry) IsGWEnabled() bool

func (*GRpcEntry) IsTlsEnabled added in v1.1.1

func (entry *GRpcEntry) IsTlsEnabled() bool

func (*GRpcEntry) Shutdown

func (entry *GRpcEntry) Shutdown(event rk_query.Event)

func (*GRpcEntry) String added in v1.1.1

func (entry *GRpcEntry) String() string

func (*GRpcEntry) Wait added in v1.1.1

func (entry *GRpcEntry) Wait(draining time.Duration)

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

type RegFuncGRpc

type RegFuncGRpc func(server *grpc.Server)

Directories

Path Synopsis
api
v1
Package rk_grpc_common_v1 is a reverse proxy.
Package rk_grpc_common_v1 is a reverse proxy.

Jump to

Keyboard shortcuts

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