grpc

package
v2.0.33 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JWTStreamTokenInterceptor

func JWTStreamTokenInterceptor(token string) grpc.StreamServerInterceptor

func JWTUnaryTokenInterceptor

func JWTUnaryTokenInterceptor(token string) grpc.UnaryServerInterceptor

func NewBearerAuth

func NewBearerAuth(key string) *jwtAuth

func NewClientTLSCredentials

func NewClientTLSCredentials(caCertPem []byte) (credentials.TransportCredentials, error)

func NewServerTLSCredentials

func NewServerTLSCredentials(serverCertPem, serverKeyPem []byte) (credentials.TransportCredentials, error)

func StreamCertInterceptor

func StreamCertInterceptor() grpc.StreamServerInterceptor

func UnaryCertInterceptor

func UnaryCertInterceptor() grpc.UnaryServerInterceptor

Types

type RegisterService

type RegisterService func(srv *grpc.Server)

type ResolverData

type ResolverData map[string]ResolverEntity

type ResolverEntity

type ResolverEntity struct {
	Addr  []string
	Token string
	Ca    []byte
}

type ShutdownService

type ShutdownService interface {
	Stop()
	GracefulStop()
}

func Startup

func Startup(addr string, token string, serverCertPEM, serverKeyPEM []byte, opts []grpc.ServerOption, register RegisterService, wg *sync.WaitGroup) (ShutdownService, error)

type UBResolverBuilder

type UBResolverBuilder struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewUBResolver

func NewUBResolver(addrs ResolverData) *UBResolverBuilder

func (*UBResolverBuilder) Build

func (*UBResolverBuilder) Dial

func (r *UBResolverBuilder) Dial(name string) (*grpc.ClientConn, error)

func (*UBResolverBuilder) Scheme

func (r *UBResolverBuilder) Scheme() string

Jump to

Keyboard shortcuts

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