Documentation ¶
Index ¶
- Constants
- func ConfigureDelegateLogging(verbosity int)
- func CreateUserSystemdFile(name string, log commonlog.Logger) (*os.File, error)
- func EnableUserSystemd(name string, log commonlog.Logger) error
- func GRPCAborted(err error) error
- func GRPCAbortedf(format string, args ...any) error
- func Interact(server GRPCInteractor, interact map[string]InteractFunc) error
- func InteractRelay(server GRPCInteractor, client GRPCInteractor, start *api.Interaction_Start, ...) error
- func InteractionErrorDetails(err error) *api.InteractionErrorDetails
- func NewCommand(start *api.Interaction_Start, log commonlog.Logger) *exec.Command
- func ScheduleHost(capability ard.Value, host string) bool
- func ScheduleIPPort(relationship ard.Value, ip string, port int64) bool
- func StartCommand(command *exec.Command, server GRPCInteractor, log commonlog.Logger) error
- func UnpackGRPCError(err error) error
- type Capability
- type Change
- type Connection
- type Dir
- type GRPCInteractor
- type Host
- type InteractFunc
- type LockedReadCloser
- type LockedWriteCloser
- type OCIContainer
- type OCIImageReference
- type OCIMappedPort
- type OnChangedFunc
- type PackageFile
- type PackageIdentifier
- type PackageIdentifiers
- type Process
- type Relationship
- type State
- func (self *State) CreatePackageFile(namespace string, type_ string, name string, path string) (io.WriteCloser, error)
- func (self *State) DeletePackage(namespace string, type_ string, name string) error
- func (self *State) GetHost(name string) (*Host, error)
- func (self *State) GetNamespaceDir(namespace string) string
- func (self *State) GetPackageDir(namespace string, type_ string, name string) string
- func (self *State) GetPackageMainFile(namespace string, type_ string, name string) string
- func (self *State) GetPackageTypeDir(namespace string, type_ string) string
- func (self *State) ListNamespaces() ([]string, error)
- func (self *State) ListNamespacesFor(namespace string) ([]string, error)
- func (self *State) ListPackageFiles(namespace string, type_ string, name string) ([]PackageFile, error)
- func (self *State) ListPackages(namespace string, type_ string) (PackageIdentifiers, error)
- func (self *State) LockAndCreatePackageFile(namespace string, type_ string, name string, path string) (*LockedWriteCloser, error)
- func (self *State) LockAndOpenPackageFile(namespace string, type_ string, name string, path string) (*LockedReadCloser, error)
- func (self *State) LockPackage(namespace string, type_ string, name string, create bool) (fslock.Handle, error)
- func (self *State) OpenPackageFile(namespace string, type_ string, name string, path string) (io.ReadCloser, error)
- func (self *State) OpenServiceClout(context contextpkg.Context, namespace string, serviceName string, ...) (fslock.Handle, *cloutpkg.Clout, error)
- func (self *State) SaveServiceClout(serviceNamespace string, serviceName string, clout *cloutpkg.Clout) error
- func (self *State) SetHost(name string, host *Host) error
- type Watcher
Constants ¶
View Source
const ( Added = Change(1) Removed = Change(2) Changed = Change(3) )
View Source
const LOCK_FILE = ".lock"
Variables ¶
This section is empty.
Functions ¶
func ConfigureDelegateLogging ¶
func ConfigureDelegateLogging(verbosity int)
func CreateUserSystemdFile ¶
func GRPCAborted ¶
func GRPCAbortedf ¶
func Interact ¶
func Interact(server GRPCInteractor, interact map[string]InteractFunc) error
func InteractRelay ¶
func InteractRelay(server GRPCInteractor, client GRPCInteractor, start *api.Interaction_Start, log commonlog.Logger) error
func InteractionErrorDetails ¶
func InteractionErrorDetails(err error) *api.InteractionErrorDetails
func NewCommand ¶
func ScheduleHost ¶
func ScheduleIPPort ¶
func StartCommand ¶
func UnpackGRPCError ¶
Types ¶
type Capability ¶
type Capability struct {
// contains filtered or unexported fields
}
type Connection ¶
type Connection struct { Relationship Name string IP string Port int64 Source *OCIContainer Target *OCIContainer }
func GetCloutConnections ¶
func GetCloutConnections(clout *cloutpkg.Clout) ([]*Connection, error)
func GetConnection ¶
func GetVertexConnections ¶
func GetVertexConnections(vertex *cloutpkg.Vertex) ([]*Connection, error)
type GRPCInteractor ¶
type GRPCInteractor interface { Send(*api.Interaction) error Recv() (*api.Interaction, error) }
Both api.Agent_InteractServer and api.Agent_InteractClient
type InteractFunc ¶
type InteractFunc func(start *api.Interaction_Start) error
type LockedReadCloser ¶
type LockedReadCloser struct { ReadCloser io.ReadCloser Lock fslock.Handle }
type LockedWriteCloser ¶
type LockedWriteCloser struct { WriteCloser io.WriteCloser Lock fslock.Handle }
type OCIContainer ¶
type OCIContainer struct { Capability Host string Name string Reference string CreateArguments []string Ports []OCIMappedPort }
func GetCloutOCIContainers ¶
func GetCloutOCIContainers(clout *cloutpkg.Clout) ([]*OCIContainer, error)
func GetOCIContainer ¶
func GetVertexOCIContainers ¶
func GetVertexOCIContainers(vertex *cloutpkg.Vertex) ([]*OCIContainer, error)
type OCIImageReference ¶
type OCIImageReference struct { Artifact string `ard:"artifact"` Reference string `ard:"reference"` Host string `ard:"host"` Image string `ard:"image"` Tag string `ard:"tag"` Port int64 `ard:"port"` Repository string `ard:"repository"` DigestAlgorithm string `ard:"digest-algorithm"` DigestHex string `ard:"digest-hex"` }
func (OCIImageReference) String ¶
func (self OCIImageReference) String() string
fmt.Stringer interface
func (OCIImageReference) Validate ¶
func (self OCIImageReference) Validate() error
type OCIMappedPort ¶
func GetOCIContainerMappedPorts ¶
func GetOCIContainerMappedPorts(capability ard.Value) ([]OCIMappedPort, error)
type OnChangedFunc ¶
type PackageFile ¶
type PackageIdentifier ¶
type PackageIdentifiers ¶
type PackageIdentifiers []PackageIdentifier
func (PackageIdentifiers) Less ¶
func (self PackageIdentifiers) Less(i, j int) bool
sort.Interface interface
func (PackageIdentifiers) Swap ¶
func (self PackageIdentifiers) Swap(i, j int)
sort.Interface interface
type Process ¶
type Process struct { Capability Host string Name string Command string Arguments []string }
func GetProcesses ¶
type Relationship ¶
type Relationship struct {
// contains filtered or unexported fields
}
type State ¶
type State struct {
RootDir string
}
func (*State) CreatePackageFile ¶
func (*State) DeletePackage ¶
func (*State) GetNamespaceDir ¶
func (*State) GetPackageDir ¶
func (*State) GetPackageMainFile ¶
func (*State) GetPackageTypeDir ¶
func (*State) ListNamespaces ¶
func (*State) ListNamespacesFor ¶
func (*State) ListPackageFiles ¶
func (*State) ListPackages ¶
func (self *State) ListPackages(namespace string, type_ string) (PackageIdentifiers, error)
func (*State) LockAndCreatePackageFile ¶
func (*State) LockAndOpenPackageFile ¶
func (*State) LockPackage ¶
func (*State) OpenPackageFile ¶
func (*State) OpenServiceClout ¶
func (*State) SaveServiceClout ¶
Click to show internal directories.
Click to hide internal directories.