grpc

package
v0.0.0-...-d99d806 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigFromContext

func GetConfigFromContext(ctx context.Context) any

func Init

func Init(grpcContext context.Context,
	connParams *GrpcConnectionParams,
	appConfig *config.CommonConfiguration,
	workerFuncs WorkerFunctions)

func WithGRPCConfig

func WithGRPCConfig(parentContext context.Context, cfg any) context.Context

Types

type DeleteFunc

type DeleteFunc func(context.Context, string, string) error

type GrpcConnection

type GrpcConnection struct {
	Conn   *grpc.ClientConn
	Client agent.AgentClient
}

func (*GrpcConnection) SetClient

func (g *GrpcConnection) SetClient(client agent.AgentClient)

func (*GrpcConnection) SetConn

func (g *GrpcConnection) SetConn(conn *grpc.ClientConn)

type GrpcConnectionParams

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

func GrpcTokenToConnectionParams

func GrpcTokenToConnectionParams(grpcToken string, insecureGrpc bool) (*GrpcConnectionParams, error)

type SecretListFunc

type SecretListFunc func(context.Context, string, string) ([]string, error)

type WatchFunc

type WatchFunc func(context.Context, string) []*common.ContainerStateItem

type WorkerFunctions

type WorkerFunctions struct {
	Deploy     DeployFunc
	Watch      WatchFunc
	Delete     DeleteFunc
	SecretList SecretListFunc
}

Jump to

Keyboard shortcuts

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