Documentation ¶
Index ¶
- func WithCheckHandler(h CheckHandler) func(*GrpcServer)
- func WithExecHandler(h ExecHandler) func(*GrpcServer)
- func WithServiceApplyResourceHandler(h ApplyResourceHandler) func(*GrpcServer)
- func WithServiceDeleteResourceHandler(h DeleteResourceHandler) func(*GrpcServer)
- func WithWatchHandler(h WatchHandler) func(*GrpcServer)
- type ApplyResourceHandler
- type CheckHandler
- type Config
- type DeleteResourceHandler
- type ExecHandler
- type GrpcServer
- func (r *GrpcServer) ApplyResource(ctx context.Context, req *servicepb.FunctionServiceRequest) (*servicepb.FunctionServiceResponse, error)
- func (r *GrpcServer) Check(ctx context.Context, in *healthpb.HealthCheckRequest) (*healthpb.HealthCheckResponse, error)
- func (r *GrpcServer) DeleteResource(ctx context.Context, req *servicepb.FunctionServiceRequest) (*emptypb.Empty, error)
- func (r *GrpcServer) ExecuteFunction(ctx context.Context, req *executorpb.ExecuteFunctionRequest) (*executorpb.ExecuteFunctionResponse, error)
- func (r *GrpcServer) Start(ctx context.Context) error
- func (r *GrpcServer) Stop()
- func (r *GrpcServer) Watch(in *healthpb.HealthCheckRequest, stream healthpb.Health_WatchServer) error
- type Option
- type WatchHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithCheckHandler ¶
func WithCheckHandler(h CheckHandler) func(*GrpcServer)
func WithExecHandler ¶
func WithExecHandler(h ExecHandler) 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 ¶
type ApplyResourceHandler func(context.Context, *servicepb.FunctionServiceRequest) (*servicepb.FunctionServiceResponse, error)
Service Handlers
type CheckHandler ¶
type CheckHandler func(context.Context, *healthpb.HealthCheckRequest) (*healthpb.HealthCheckResponse, error)
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 DeleteResourceHandler ¶
type ExecHandler ¶
type ExecHandler func(context.Context, *executorpb.ExecuteFunctionRequest) (*executorpb.ExecuteFunctionResponse, error)
ExecHandler
type GrpcServer ¶
type GrpcServer struct { executorpb.UnimplementedFunctionExecutorServer servicepb.UnimplementedFunctionServiceServer // contains filtered or unexported fields }
func New ¶
func New(c Config, opts ...Option) *GrpcServer
func (*GrpcServer) ApplyResource ¶
func (r *GrpcServer) ApplyResource(ctx context.Context, req *servicepb.FunctionServiceRequest) (*servicepb.FunctionServiceResponse, error)
func (*GrpcServer) Check ¶
func (r *GrpcServer) Check(ctx context.Context, in *healthpb.HealthCheckRequest) (*healthpb.HealthCheckResponse, error)
Check implements `service Health`.
func (*GrpcServer) DeleteResource ¶
func (r *GrpcServer) DeleteResource(ctx context.Context, req *servicepb.FunctionServiceRequest) (*emptypb.Empty, error)
func (*GrpcServer) ExecuteFunction ¶
func (r *GrpcServer) ExecuteFunction(ctx context.Context, req *executorpb.ExecuteFunctionRequest) (*executorpb.ExecuteFunctionResponse, error)
func (*GrpcServer) Stop ¶
func (r *GrpcServer) Stop()
func (*GrpcServer) Watch ¶
func (r *GrpcServer) Watch(in *healthpb.HealthCheckRequest, stream healthpb.Health_WatchServer) error
Watch implements `service Health`.
type Option ¶
type Option func(*GrpcServer)
type WatchHandler ¶
type WatchHandler func(*healthpb.HealthCheckRequest, healthpb.Health_WatchServer) error
Click to show internal directories.
Click to hide internal directories.