delegate

package
v0.0.0-...-fb044b6 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloutFromAPI

func CloutFromAPI(clout *api.Clout) (*cloutpkg.Clout, error)

func CloutToAPI

func CloutToAPI(clout *cloutpkg.Clout, yaml bool) (*api.Clout, error)

func NextToAPI

func NextToAPI(next Next) *api.NextService

func NextsToAPI

func NextsToAPI(next []Next) []*api.NextService

Types

type Delegate

type Delegate interface {
	ListResources(namespace string, serviceName string, coercedClout *cloutpkg.Clout) ([]Resource, error)
	ProcessService(namespace string, serviceName string, phase string, clout *cloutpkg.Clout, coercedClout *cloutpkg.Clout) (*cloutpkg.Clout, []Next, error)
	Interact(server sdk.GRPCInteractor, start *api.Interaction_Start) error
}

type DelegateGRPCClient

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

func NewDelegateGRPCClient

func NewDelegateGRPCClient(context contextpkg.Context, client api.DelegateClient) *DelegateGRPCClient

func (*DelegateGRPCClient) Interact

func (self *DelegateGRPCClient) Interact(server sdk.GRPCInteractor, start *api.Interaction_Start) error

Delegate interface

func (*DelegateGRPCClient) ListResources

func (self *DelegateGRPCClient) ListResources(namespace string, serviceName string, coercedClout *cloutpkg.Clout) ([]Resource, error)

Delegate interface

func (*DelegateGRPCClient) ProcessService

func (self *DelegateGRPCClient) ProcessService(namespace string, serviceName string, phase string, clout *cloutpkg.Clout, coercedClout *cloutpkg.Clout) (*cloutpkg.Clout, []Next, error)

Delegate interface

type DelegateGRPCServer

type DelegateGRPCServer struct {
	api.UnimplementedDelegateServer
	// contains filtered or unexported fields
}

func NewDelegateGRPCServer

func NewDelegateGRPCServer(implementation Delegate) *DelegateGRPCServer

func (*DelegateGRPCServer) Interact

func (self *DelegateGRPCServer) Interact(server api.Delegate_InteractServer) error

api.DelegateServer interface

func (*DelegateGRPCServer) ListResources

func (self *DelegateGRPCServer) ListResources(listResources *api.DelegateListResources, server api.Delegate_ListResourcesServer) error

api.DelegateServer interface

func (*DelegateGRPCServer) ProcessService

func (self *DelegateGRPCServer) ProcessService(context contextpkg.Context, processService *api.ProcessService) (*api.ProcessServiceResult, error)

api.DelegateServer interface

func (*DelegateGRPCServer) Start

func (self *DelegateGRPCServer) Start(protocol string, address string, port int) error

type DelegatePlugin

type DelegatePlugin struct {
	plugin.Plugin
	// contains filtered or unexported fields
}

func (*DelegatePlugin) GRPCClient

func (p *DelegatePlugin) GRPCClient(context contextpkg.Context, broker *plugin.GRPCBroker, client *grpc.ClientConn) (any, error)

plugin.GRPCPlugin interface

func (*DelegatePlugin) GRPCServer

func (self *DelegatePlugin) GRPCServer(broker *plugin.GRPCBroker, server *grpc.Server) error

plugin.GRPCPlugin interface

type DelegatePluginClient

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

func NewDelegatePluginClient

func NewDelegatePluginClient(name string, command string) *DelegatePluginClient

func (*DelegatePluginClient) Close

func (self *DelegatePluginClient) Close()

func (*DelegatePluginClient) Delegate

func (self *DelegatePluginClient) Delegate() (Delegate, error)

type DelegatePluginServer

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

func NewDelegatePluginServer

func NewDelegatePluginServer(implementation Delegate) *DelegatePluginServer

func (*DelegatePluginServer) Start

func (self *DelegatePluginServer) Start()

type Next

type Next struct {
	Host        string
	Phase       string
	Namespace   string
	ServiceName string
}

func AppendNext

func AppendNext(next []Next, host string, phase string, namespace string, serviceName string) []Next

func MergeNexts

func MergeNexts(to []Next, from []Next) []Next

func NextFromAPI

func NextFromAPI(next *api.NextService) Next

func NextsFromAPI

func NextsFromAPI(next []*api.NextService) []Next

func (Next) Equals

func (self Next) Equals(next Next) bool

type Resource

type Resource struct {
	Type string
	Name string
	Host string
}

Jump to

Keyboard shortcuts

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