grpcserver

package
v0.0.0-...-75f4faa Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: Apache-2.0 Imports: 22 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithCheckHandler

func WithCheckHandler(h CheckHandler) func(*GrpcServer)

func WithServiceApplyResourceHandler

func WithServiceApplyResourceHandler(h ApplyResourceHandler) func(*GrpcServer)

func WithServiceDeleteResourceHandler

func WithServiceDeleteResourceHandler(h DeleteResourceHandler) func(*GrpcServer)

func WithWatchHandler

func WithWatchHandler(h WatchHandler) func(*GrpcServer)

Types

type ApplyResourceHandler

Service Handlers

type CheckHandler

Health Handlers

type Config

type Config struct {
	// gRPC server address
	Address string

	// insecure server
	Insecure bool

	// MaxRPC
	MaxRPC int64

	// request timeout
	Timeout time.Duration

	// CertDir is the directory that contains the server key and certificate. The
	// server key and certificate.
	CertDir string

	// CertName is the server certificate name. Defaults to tls.crt.
	CertName string

	// KeyName is the server key name. Defaults to tls.key.
	KeyName string

	// CaName is the ca certificate name. Defaults to ca.crt.
	CaName string
}

type GrpcServer

type GrpcServer struct {
	servicepb.UnimplementedFunctionServiceServer
	// contains filtered or unexported fields
}

func New

func New(c Config, opts ...Option) *GrpcServer

func (*GrpcServer) Check

Check implements `service Health`.

func (*GrpcServer) DeleteResource

func (s *GrpcServer) DeleteResource(ctx context.Context, req *servicepb.FunctionServiceRequest) (*emptypb.Empty, error)

func (*GrpcServer) Start

func (s *GrpcServer) Start() error

func (*GrpcServer) Watch

Watch implements `service Health`.

type Option

type Option func(*GrpcServer)

Jump to

Keyboard shortcuts

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