kfserver1

package
v0.0.0-...-e5ebed8 Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: Apache-2.0, BSD-3-Clause Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New converts a kfprotov1.ProviderServer into a server capable of handling kform protocol requests and issuing responses using the gRPC types.

func Serve

func Serve(name string, serverFactory func() kfprotov1.ProviderServer, opts ...ServeOpt) error

Types

type GRPCProviderPlugin

type GRPCProviderPlugin struct {
	GRPCProvider func() kfprotov1.ProviderServer
	Opts         []ServeOpt
	Name         string
}

func (*GRPCProviderPlugin) GRPCClient

func (p *GRPCProviderPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)

func (*GRPCProviderPlugin) GRPCServer

func (p *GRPCProviderPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error

type ServeConfig

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

type ServeOpt

type ServeOpt interface {
	ApplyServeOpt(*ServeConfig) error
}

func WithGoPluginLogger

func WithGoPluginLogger(logger *slog.Logger) ServeOpt

WithGoPluginLogger returns a ServeOpt that will set the logger that go-plugin should use to log messages.

Jump to

Keyboard shortcuts

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