Documentation ¶
Index ¶
- Constants
- func NewAddHostCommand(address string) map[string]any
- func NewProcessServiceCommand(namespace string, serviceName string, phase string) map[string]any
- type Agent
- func (self *Agent) CoerceClout(clout *cloutpkg.Clout, copy_ bool) (*cloutpkg.Clout, error)
- func (self *Agent) CompileTOSCA(context contextpkg.Context, templateNamespace string, templateName string, ...) (*cloutpkg.Clout, *problemspkg.Problems, error)
- func (self *Agent) DeployService(context contextpkg.Context, templateNamespace string, templateName string, ...) error
- func (self *Agent) Instantiate(clout *cloutpkg.Clout, coercedClout *cloutpkg.Clout) bool
- func (self *Agent) ListResources(context contextpkg.Context, namespace string, serviceName string, type_ string) (ResourceIdentifiers, error)
- func (self *Agent) NewDelegate(namespace string, delegateName string) (Delegate, error)
- func (self *Agent) NewDelegates() *Delegates
- func (self *Agent) NewPluginDelegate(namespace string, delegateName string) (*PluginDelegate, error)
- func (self *Agent) OpenFile(path string, coerceClout bool) (io.ReadCloser, error)
- func (self *Agent) ParseTOSCA(context contextpkg.Context, templateNamespace string, templateName string) (*normal.ServiceTemplate, *problemspkg.Problems, error)
- func (self *Agent) ProcessAllServices(context contextpkg.Context, phase string)
- func (self *Agent) ProcessNext(context contextpkg.Context, next []delegatepkg.Next, delegates *Delegates)
- func (self *Agent) ProcessService(context contextpkg.Context, namespace string, serviceName string, phase string, ...)
- func (self *Agent) Release() error
- type Broadcaster
- type Delegate
- type Delegates
- func (self *Delegates) All() []delegatepkg.Delegate
- func (self *Delegates) Fill(namespace string, coercedClout *cloutpkg.Clout)
- func (self *Delegates) Get(namespace string, delegateName string) (delegatepkg.Delegate, error)
- func (self *Delegates) NewDelegate(namespace string, delegateName string) (Delegate, error)
- func (self *Delegates) Release()
- type GRPC
- func (self *GRPC) AddHost(context contextpkg.Context, addHost *api.AddHost) (*emptypb.Empty, error)
- func (self *GRPC) DeployService(context contextpkg.Context, deployService *api.DeployService) (*emptypb.Empty, error)
- func (self *GRPC) GetPackageFiles(getPackageFiles *api.GetPackageFiles, server api.Agent_GetPackageFilesServer) error
- func (self *GRPC) GetVersion(context contextpkg.Context, empty *emptypb.Empty) (*api.Version, error)
- func (self *GRPC) Interact(server api.Agent_InteractServer) error
- func (self *GRPC) ListHosts(empty *emptypb.Empty, server api.Agent_ListHostsServer) error
- func (self *GRPC) ListNamespaces(empty *emptypb.Empty, server api.Agent_ListNamespacesServer) error
- func (self *GRPC) ListPackageFiles(identifier *api.PackageIdentifier, server api.Agent_ListPackageFilesServer) error
- func (self *GRPC) ListPackages(listPackages *api.ListPackages, server api.Agent_ListPackagesServer) error
- func (self *GRPC) ListResources(listResources *api.ListResources, server api.Agent_ListResourcesServer) error
- func (self *GRPC) RemovePackage(context contextpkg.Context, packageIdentifer *api.PackageIdentifier) (*emptypb.Empty, error)
- func (self *GRPC) SetPackageFiles(server api.Agent_SetPackageFilesServer) error
- func (self *GRPC) Start() error
- func (self *GRPC) Stop()
- type Gossip
- func (self *Gossip) AddHosts(gossipAddresses []string) error
- func (self *Gossip) Announce() error
- func (self *Gossip) GetBroadcasts(overhead int, limit int) [][]byte
- func (self *Gossip) GetHost(name string) *HostInformation
- func (self *Gossip) GetMember(host string) (*memberlist.Node, bool)
- func (self *Gossip) ListHosts() HostInformations
- func (self *Gossip) LocalGossipAddress() string
- func (self *Gossip) LocalState(join bool) []byte
- func (self *Gossip) MergeRemoteState(buf []byte, join bool)
- func (self *Gossip) NodeMeta(limit int) []byte
- func (self *Gossip) NotifyMsg(bytes []byte)
- func (self *Gossip) Send(host string, message []byte) error
- func (self *Gossip) SendJSON(host string, message any) error
- func (self *Gossip) Start() error
- func (self *Gossip) Stop() error
- type HTTP
- type HostInformation
- type HostInformations
- type Namespaced
- type OnMessageFunc
- type PluginDelegate
- type ReceiveFunc
- type Receiver
- type ResourceIdentifier
- type ResourceIdentifiers
- type Server
- type Ticker
Constants ¶
View Source
const ( ADD_HOST = "khutulun.addHost" PROCESS_SERVICE = "khutulun.processService" )
View Source
const BUFFER_SIZE = 65536
View Source
const DEFAULT_MAX_MESSAGE_SIZE = 8192
View Source
const TICKER_FREQUENCY = 30 * time.Second
Variables ¶
This section is empty.
Functions ¶
func NewAddHostCommand ¶
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
func (*Agent) CoerceClout ¶
func (*Agent) CompileTOSCA ¶
func (*Agent) DeployService ¶
func (*Agent) Instantiate ¶
func (*Agent) ListResources ¶
func (self *Agent) ListResources(context contextpkg.Context, namespace string, serviceName string, type_ string) (ResourceIdentifiers, error)
func (*Agent) NewDelegate ¶
func (*Agent) NewDelegates ¶
func (*Agent) NewPluginDelegate ¶
func (self *Agent) NewPluginDelegate(namespace string, delegateName string) (*PluginDelegate, error)
func (*Agent) ParseTOSCA ¶
func (self *Agent) ParseTOSCA(context contextpkg.Context, templateNamespace string, templateName string) (*normal.ServiceTemplate, *problemspkg.Problems, error)
func (*Agent) ProcessAllServices ¶
func (self *Agent) ProcessAllServices(context contextpkg.Context, phase string)
func (*Agent) ProcessNext ¶
func (self *Agent) ProcessNext(context contextpkg.Context, next []delegatepkg.Next, delegates *Delegates)
func (*Agent) ProcessService ¶
type Broadcaster ¶
func NewBroadcaster ¶
func NewBroadcaster(protocol string, address string, port int) *Broadcaster
func (*Broadcaster) Address ¶
func (self *Broadcaster) Address() *net.UDPAddr
func (*Broadcaster) Send ¶
func (self *Broadcaster) Send(message []byte) error
func (*Broadcaster) SendJSON ¶
func (self *Broadcaster) SendJSON(message any) error
func (*Broadcaster) Start ¶
func (self *Broadcaster) Start() error
func (*Broadcaster) Stop ¶
func (self *Broadcaster) Stop() error
type Delegate ¶
type Delegate interface { Name() (string, string) Delegate() delegatepkg.Delegate Release() error }
type Delegates ¶
type Delegates struct {
// contains filtered or unexported fields
}
func (*Delegates) All ¶
func (self *Delegates) All() []delegatepkg.Delegate
func (*Delegates) NewDelegate ¶
type GRPC ¶
type GRPC struct { api.UnimplementedAgentServer Protocol string Address string Port int Local bool // contains filtered or unexported fields }
func (*GRPC) DeployService ¶
func (self *GRPC) DeployService(context contextpkg.Context, deployService *api.DeployService) (*emptypb.Empty, error)
api.AgentServer interface
func (*GRPC) GetPackageFiles ¶
func (self *GRPC) GetPackageFiles(getPackageFiles *api.GetPackageFiles, server api.Agent_GetPackageFilesServer) error
api.AgentServer interface
func (*GRPC) GetVersion ¶
func (self *GRPC) GetVersion(context contextpkg.Context, empty *emptypb.Empty) (*api.Version, error)
api.AgentServer interface
func (*GRPC) Interact ¶
func (self *GRPC) Interact(server api.Agent_InteractServer) error
api.AgentServer interface
func (*GRPC) ListNamespaces ¶
api.AgentServer interface
func (*GRPC) ListPackageFiles ¶
func (self *GRPC) ListPackageFiles(identifier *api.PackageIdentifier, server api.Agent_ListPackageFilesServer) error
api.AgentServer interface
func (*GRPC) ListPackages ¶
func (self *GRPC) ListPackages(listPackages *api.ListPackages, server api.Agent_ListPackagesServer) error
api.AgentServer interface
func (*GRPC) ListResources ¶
func (self *GRPC) ListResources(listResources *api.ListResources, server api.Agent_ListResourcesServer) error
api.AgentServer interface
func (*GRPC) RemovePackage ¶
func (self *GRPC) RemovePackage(context contextpkg.Context, packageIdentifer *api.PackageIdentifier) (*emptypb.Empty, error)
api.AgentServer interface
func (*GRPC) SetPackageFiles ¶
func (self *GRPC) SetPackageFiles(server api.Agent_SetPackageFilesServer) error
api.AgentServer interface
type Gossip ¶
type Gossip struct { Address string Port int // memberlist default is 7946 // contains filtered or unexported fields }
func (*Gossip) GetBroadcasts ¶
memberlist.Delegate interface
func (*Gossip) GetHost ¶
func (self *Gossip) GetHost(name string) *HostInformation
func (*Gossip) ListHosts ¶
func (self *Gossip) ListHosts() HostInformations
func (*Gossip) LocalGossipAddress ¶
func (*Gossip) LocalState ¶
memberlist.Delegate interface
func (*Gossip) MergeRemoteState ¶
memberlist.Delegate interface
type HTTP ¶
type HostInformation ¶
type HostInformations ¶
type HostInformations []*HostInformation
func (HostInformations) Less ¶
func (self HostInformations) Less(i, j int) bool
sort.Interface interface
type Namespaced ¶
func NewNamespaced ¶
func NewNamespaced(namespace string, name string) Namespaced
type OnMessageFunc ¶
type PluginDelegate ¶
type PluginDelegate struct {
// contains filtered or unexported fields
}
func (*PluginDelegate) Delegate ¶
func (self *PluginDelegate) Delegate() delegatepkg.Delegate
Delegate interface
func (*PluginDelegate) Name ¶
func (self *PluginDelegate) Name() (string, string)
Delegate interface
type ReceiveFunc ¶
type Receiver ¶
type Receiver struct { Protocol string Inter *net.Interface Address string Port int Receive ReceiveFunc MaxMessageSize int Ignore []*net.UDPAddr // contains filtered or unexported fields }
func NewReceiver ¶
type ResourceIdentifier ¶
type ResourceIdentifiers ¶
type ResourceIdentifiers []ResourceIdentifier
func (ResourceIdentifiers) Less ¶
func (self ResourceIdentifiers) Less(i, j int) bool
sort.Interface interface
func (ResourceIdentifiers) Swap ¶
func (self ResourceIdentifiers) Swap(i, j int)
sort.Interface interface
type Server ¶
type Server struct { GRPCProtocol string GRPCAddress string GRPCPort int HTTPProtocol string HTTPAddress string HTTPPort int GossipAddress string GossipPort int BroadcastProtocol string BroadcastInterface *net.Interface BroadcastAddress string // https://en.wikipedia.org/wiki/Multicast_address BroadcastPort int // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.