client

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2025 License: MIT Imports: 11 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExampleBackendUsage added in v1.9.0

func ExampleBackendUsage()

ExampleBackendUsage demonstrates how to create clients with different backends

func RegisterBackendFactory added in v1.9.0

func RegisterBackendFactory(factory backends.ClientBackendFactory)

RegisterBackendFactory registers a backend factory

Types

type ColoniesClient

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

ColoniesClient is the main client for interacting with Colonies server

func CreateColoniesClient

func CreateColoniesClient(host string, port int, insecure bool, skipTLSVerify bool) *ColoniesClient

CreateColoniesClient creates a new ColoniesClient with default HTTP/Gin backend

func CreateColoniesClientWithConfig added in v1.9.0

func CreateColoniesClientWithConfig(config *backends.ClientConfig) *ColoniesClient

CreateColoniesClientWithConfig creates a new ColoniesClient with specified configuration

func CreateColoniesClientWithMultipleBackends added in v1.9.0

func CreateColoniesClientWithMultipleBackends(configs []*backends.ClientConfig) *ColoniesClient

CreateColoniesClientWithMultipleBackends creates a client that tries multiple backends with fallback

func (*ColoniesClient) AddAttribute

func (client *ColoniesClient) AddAttribute(attribute core.Attribute, prvKey string) (core.Attribute, error)

func (*ColoniesClient) AddChild

func (client *ColoniesClient) AddChild(processGraphID string, parentProcessID string, childProcessID string, funcSpec *core.FunctionSpec, insert bool, prvKey string) (*core.Process, error)

func (*ColoniesClient) AddColony

func (client *ColoniesClient) AddColony(colony *core.Colony, prvKey string) (*core.Colony, error)

func (*ColoniesClient) AddCron

func (client *ColoniesClient) AddCron(cron *core.Cron, prvKey string) (*core.Cron, error)

func (*ColoniesClient) AddExecutor added in v1.0.1

func (client *ColoniesClient) AddExecutor(executor *core.Executor, prvKey string) (*core.Executor, error)

func (*ColoniesClient) AddFile added in v1.5.0

func (client *ColoniesClient) AddFile(file *core.File, prvKey string) (*core.File, error)

func (*ColoniesClient) AddFunction added in v1.0.1

func (client *ColoniesClient) AddFunction(function *core.Function, prvKey string) (*core.Function, error)

func (*ColoniesClient) AddGenerator

func (client *ColoniesClient) AddGenerator(generator *core.Generator, prvKey string) (*core.Generator, error)

func (*ColoniesClient) AddLog added in v1.4.0

func (client *ColoniesClient) AddLog(processID string, logmsg string, prvKey string) error

func (*ColoniesClient) AddResource added in v1.9.0

func (client *ColoniesClient) AddResource(resource *core.Resource, prvKey string) (*core.Resource, error)

AddResource adds a new Resource instance

func (*ColoniesClient) AddResourceDefinition added in v1.9.0

func (client *ColoniesClient) AddResourceDefinition(rd *core.ResourceDefinition, prvKey string) (*core.ResourceDefinition, error)

AddResourceDefinition adds a new ResourceDefinition (requires colony owner privileges)

func (*ColoniesClient) AddUser added in v1.7.0

func (client *ColoniesClient) AddUser(user *core.User, prvKey string) (*core.User, error)

func (*ColoniesClient) ApproveExecutor added in v1.0.1

func (client *ColoniesClient) ApproveExecutor(colonyName string, executorName string, prvKey string) error

func (*ColoniesClient) AreColonyAssignmentsPaused added in v1.8.19

func (client *ColoniesClient) AreColonyAssignmentsPaused(colonyName string, prvKey string) (bool, error)

func (*ColoniesClient) Assign added in v1.0.1

func (client *ColoniesClient) Assign(colonyName string, timeout int, availableCPU string, availableMem string, prvKey string) (*core.Process, error)

func (*ColoniesClient) AssignWithContext added in v1.1.1

func (client *ColoniesClient) AssignWithContext(colonyName string,
	timeout int,
	ctx context.Context,
	availableCPU string,
	availableMem string,
	prvKey string) (*core.Process, error)

func (*ColoniesClient) ChangeColonyID added in v1.7.7

func (client *ColoniesClient) ChangeColonyID(colonyName, colonyID string, prvKey string) error

func (*ColoniesClient) ChangeExecutorID added in v1.7.7

func (client *ColoniesClient) ChangeExecutorID(colonyName, executorID string, prvKey string) error

func (*ColoniesClient) ChangeServerID added in v1.7.7

func (client *ColoniesClient) ChangeServerID(serverID string, prvKey string) error

func (*ColoniesClient) ChangeUserID added in v1.7.7

func (client *ColoniesClient) ChangeUserID(colonyName, userID string, prvKey string) error

func (*ColoniesClient) CheckHealth

func (client *ColoniesClient) CheckHealth() error

func (*ColoniesClient) Close

func (client *ColoniesClient) Close(processID string, prvKey string) error

func (*ColoniesClient) CloseClient added in v1.9.0

func (client *ColoniesClient) CloseClient() error

CloseClient closes the client and cleans up resources

func (*ColoniesClient) CloseWithOutput

func (client *ColoniesClient) CloseWithOutput(processID string, output []interface{}, prvKey string) error

func (*ColoniesClient) ColonyStatistics

func (client *ColoniesClient) ColonyStatistics(colonyName string, prvKey string) (*core.Statistics, error)

func (*ColoniesClient) CreateSnapshot added in v1.5.0

func (client *ColoniesClient) CreateSnapshot(colonyName string, label string, name string, prvKey string) (*core.Snapshot, error)

func (*ColoniesClient) Fail

func (client *ColoniesClient) Fail(processID string, errs []string, prvKey string) error

func (*ColoniesClient) GetAttribute

func (client *ColoniesClient) GetAttribute(attributeID string, prvKey string) (core.Attribute, error)

func (*ColoniesClient) GetClusterInfo

func (client *ColoniesClient) GetClusterInfo(prvKey string) (*cluster.Config, error)

func (*ColoniesClient) GetColonies

func (client *ColoniesClient) GetColonies(prvKey string) ([]*core.Colony, error)

func (*ColoniesClient) GetColonyByName added in v1.7.0

func (client *ColoniesClient) GetColonyByName(colonyName string, prvKey string) (*core.Colony, error)

func (*ColoniesClient) GetConfig added in v1.9.0

func (client *ColoniesClient) GetConfig() *backends.ClientConfig

GetConfig returns the client configuration

func (*ColoniesClient) GetCron

func (client *ColoniesClient) GetCron(cronID string, prvKey string) (*core.Cron, error)

func (*ColoniesClient) GetCrons

func (client *ColoniesClient) GetCrons(colonyName string, count int, prvKey string) ([]*core.Cron, error)

func (*ColoniesClient) GetExecutor added in v1.0.1

func (client *ColoniesClient) GetExecutor(colonyName string, executorName string, prvKey string) (*core.Executor, error)

func (*ColoniesClient) GetExecutors added in v1.0.1

func (client *ColoniesClient) GetExecutors(colonyName string, prvKey string) ([]*core.Executor, error)

func (*ColoniesClient) GetFailedProcessGraphs

func (client *ColoniesClient) GetFailedProcessGraphs(colonyName string, count int, prvKey string) ([]*core.ProcessGraph, error)

func (*ColoniesClient) GetFailedProcesses

func (client *ColoniesClient) GetFailedProcesses(colonyName string, executorType string, label string, initiator string, count int, prvKey string) ([]*core.Process, error)

func (*ColoniesClient) GetFileByID added in v1.5.0

func (client *ColoniesClient) GetFileByID(colonyName string, fileID string, prvKey string) ([]*core.File, error)

func (*ColoniesClient) GetFileByName added in v1.5.0

func (client *ColoniesClient) GetFileByName(colonyName string, label string, name string, prvKey string) ([]*core.File, error)

func (*ColoniesClient) GetFileData added in v1.7.4

func (client *ColoniesClient) GetFileData(colonyName string, label string, prvKey string) ([]*core.FileData, error)

func (*ColoniesClient) GetFileLabels added in v1.5.0

func (client *ColoniesClient) GetFileLabels(colonyName string, prvKey string) ([]*core.Label, error)

func (*ColoniesClient) GetFileLabelsByName added in v1.6.0

func (client *ColoniesClient) GetFileLabelsByName(colonyName string, name string, exact bool, prvKey string) ([]*core.Label, error)

func (*ColoniesClient) GetFunctionsByColony added in v1.7.7

func (client *ColoniesClient) GetFunctionsByColony(colonyName string, prvKey string) ([]*core.Function, error)

func (*ColoniesClient) GetFunctionsByExecutor added in v1.7.7

func (client *ColoniesClient) GetFunctionsByExecutor(colonyName string, executorName string, prvKey string) ([]*core.Function, error)

func (*ColoniesClient) GetGenerator

func (client *ColoniesClient) GetGenerator(generatorID string, prvKey string) (*core.Generator, error)

func (*ColoniesClient) GetGenerators

func (client *ColoniesClient) GetGenerators(colonyName string, count int, prvKey string) ([]*core.Generator, error)

func (*ColoniesClient) GetLatestFileByName added in v1.5.0

func (client *ColoniesClient) GetLatestFileByName(colonyName string, label string, name string, prvKey string) ([]*core.File, error)

func (*ColoniesClient) GetLogsByExecutor added in v1.7.7

func (client *ColoniesClient) GetLogsByExecutor(colonyName, executorName string, count int, prvKey string) ([]*core.Log, error)

func (*ColoniesClient) GetLogsByExecutorSince added in v1.7.7

func (client *ColoniesClient) GetLogsByExecutorSince(colonyName, executorName string, count int, since int64, prvKey string) ([]*core.Log, error)

func (*ColoniesClient) GetLogsByProcess added in v1.7.7

func (client *ColoniesClient) GetLogsByProcess(colonyName string, processID string, count int, prvKey string) ([]*core.Log, error)

func (*ColoniesClient) GetLogsByProcessSince added in v1.7.7

func (client *ColoniesClient) GetLogsByProcessSince(colonyName string, processID string, count int, since int64, prvKey string) ([]*core.Log, error)

func (*ColoniesClient) GetProcess

func (client *ColoniesClient) GetProcess(processID string, prvKey string) (*core.Process, error)

func (*ColoniesClient) GetProcessGraph

func (client *ColoniesClient) GetProcessGraph(processGraphID string, prvKey string) (*core.ProcessGraph, error)

func (*ColoniesClient) GetProcessHistForColony

func (client *ColoniesClient) GetProcessHistForColony(state int, colonyName string, seconds int, prvKey string) ([]*core.Process, error)

func (*ColoniesClient) GetProcessHistForExecutor added in v1.0.1

func (client *ColoniesClient) GetProcessHistForExecutor(state int, colonyName string, executorID string, seconds int, prvKey string) ([]*core.Process, error)

func (*ColoniesClient) GetResource added in v1.9.0

func (client *ColoniesClient) GetResource(namespace, name string, prvKey string) (*core.Resource, error)

GetResource retrieves a Resource by namespace and name

func (*ColoniesClient) GetResourceDefinition added in v1.9.0

func (client *ColoniesClient) GetResourceDefinition(colonyName, name string, prvKey string) (*core.ResourceDefinition, error)

GetResourceDefinition retrieves a ResourceDefinition by name

func (*ColoniesClient) GetResourceDefinitions added in v1.9.0

func (client *ColoniesClient) GetResourceDefinitions(colonyName string, prvKey string) ([]*core.ResourceDefinition, error)

GetResourceDefinitions retrieves all ResourceDefinitions in a colony

func (*ColoniesClient) GetResources added in v1.9.0

func (client *ColoniesClient) GetResources(namespace, kind string, prvKey string) ([]*core.Resource, error)

GetResources retrieves Resources by namespace and optionally by kind

func (*ColoniesClient) GetRunningProcessGraphs

func (client *ColoniesClient) GetRunningProcessGraphs(colonyName string, count int, prvKey string) ([]*core.ProcessGraph, error)

func (*ColoniesClient) GetRunningProcesses

func (client *ColoniesClient) GetRunningProcesses(colonyName string, executorType string, label string, initiator string, count int, prvKey string) ([]*core.Process, error)

func (*ColoniesClient) GetServerInfo added in v1.9.0

func (client *ColoniesClient) GetServerInfo() (*core.ServerInfo, error)

func (*ColoniesClient) GetSnapshotByID added in v1.5.0

func (client *ColoniesClient) GetSnapshotByID(colonyName string, snapshotID string, prvKey string) (*core.Snapshot, error)

func (*ColoniesClient) GetSnapshotByName added in v1.5.0

func (client *ColoniesClient) GetSnapshotByName(colonyName string, name string, prvKey string) (*core.Snapshot, error)

func (*ColoniesClient) GetSnapshotsByColonyName added in v1.7.0

func (client *ColoniesClient) GetSnapshotsByColonyName(colonyName string, prvKey string) ([]*core.Snapshot, error)

func (*ColoniesClient) GetSuccessfulProcessGraphs

func (client *ColoniesClient) GetSuccessfulProcessGraphs(colonyName string, count int, prvKey string) ([]*core.ProcessGraph, error)

func (*ColoniesClient) GetSuccessfulProcesses

func (client *ColoniesClient) GetSuccessfulProcesses(colonyName string, executorType string, label string, initiator string, count int, prvKey string) ([]*core.Process, error)

func (*ColoniesClient) GetUser added in v1.7.0

func (client *ColoniesClient) GetUser(colonyName string, username string, prvKey string) (*core.User, error)

func (*ColoniesClient) GetUsers added in v1.7.0

func (client *ColoniesClient) GetUsers(colonyName string, prvKey string) ([]*core.User, error)

func (*ColoniesClient) GetWaitingProcessGraphs

func (client *ColoniesClient) GetWaitingProcessGraphs(colonyName string, count int, prvKey string) ([]*core.ProcessGraph, error)

func (*ColoniesClient) GetWaitingProcesses

func (client *ColoniesClient) GetWaitingProcesses(colonyName string, executorType string, label string, initiator string, count int, prvKey string) ([]*core.Process, error)

func (*ColoniesClient) PackGenerator

func (client *ColoniesClient) PackGenerator(generatorID string, arg string, prvKey string) error

func (*ColoniesClient) PauseColonyAssignments added in v1.8.19

func (client *ColoniesClient) PauseColonyAssignments(colonyName string, prvKey string) error

func (*ColoniesClient) RejectExecutor added in v1.0.1

func (client *ColoniesClient) RejectExecutor(colonyName string, executorID string, prvKey string) error

func (*ColoniesClient) RemoveAllProcessGraphs added in v1.7.0

func (client *ColoniesClient) RemoveAllProcessGraphs(colonyName string, prvKey string) error

func (*ColoniesClient) RemoveAllProcessGraphsWithState added in v1.7.0

func (client *ColoniesClient) RemoveAllProcessGraphsWithState(colonyName string, state int, prvKey string) error

func (*ColoniesClient) RemoveAllProcesses added in v1.7.0

func (client *ColoniesClient) RemoveAllProcesses(colonyName string, prvKey string) error

func (*ColoniesClient) RemoveAllProcessesWithState added in v1.7.0

func (client *ColoniesClient) RemoveAllProcessesWithState(colonyName string, state int, prvKey string) error

func (*ColoniesClient) RemoveAllSnapshots added in v1.7.7

func (client *ColoniesClient) RemoveAllSnapshots(colonyName string, prvKey string) error

func (*ColoniesClient) RemoveColony added in v1.7.0

func (client *ColoniesClient) RemoveColony(colonyName string, prvKey string) error

func (*ColoniesClient) RemoveCron added in v1.7.0

func (client *ColoniesClient) RemoveCron(cronID string, prvKey string) error

func (*ColoniesClient) RemoveExecutor added in v1.7.0

func (client *ColoniesClient) RemoveExecutor(colonyName string, executorName string, prvKey string) error

func (*ColoniesClient) RemoveFileByID added in v1.5.0

func (client *ColoniesClient) RemoveFileByID(colonyName string, fileID string, prvKey string) error

func (*ColoniesClient) RemoveFileByName added in v1.5.0

func (client *ColoniesClient) RemoveFileByName(colonyName string, label string, name string, prvKey string) error

func (*ColoniesClient) RemoveFunction added in v1.7.0

func (client *ColoniesClient) RemoveFunction(functionID string, prvKey string) error

func (*ColoniesClient) RemoveGenerator added in v1.7.0

func (client *ColoniesClient) RemoveGenerator(generatorID string, prvKey string) error

func (*ColoniesClient) RemoveProcess added in v1.7.0

func (client *ColoniesClient) RemoveProcess(processID string, prvKey string) error

func (*ColoniesClient) RemoveProcessGraph added in v1.7.0

func (client *ColoniesClient) RemoveProcessGraph(processGraphID string, prvKey string) error

func (*ColoniesClient) RemoveResource added in v1.9.0

func (client *ColoniesClient) RemoveResource(namespace, name string, prvKey string) error

RemoveResource removes a Resource by namespace and name

func (*ColoniesClient) RemoveResourceDefinition added in v1.9.0

func (client *ColoniesClient) RemoveResourceDefinition(namespace, name string, prvKey string) error

RemoveResourceDefinition removes a ResourceDefinition by namespace and name (requires colony owner privileges)

func (*ColoniesClient) RemoveSnapshotByID added in v1.7.0

func (client *ColoniesClient) RemoveSnapshotByID(colonyName string, snapshotID string, prvKey string) error

func (*ColoniesClient) RemoveSnapshotByName added in v1.7.0

func (client *ColoniesClient) RemoveSnapshotByName(colonyName string, name string, prvKey string) error

func (*ColoniesClient) RemoveUser added in v1.7.0

func (client *ColoniesClient) RemoveUser(colonyName string, username string, prvKey string) error

func (*ColoniesClient) ReportAllocation added in v1.7.8

func (client *ColoniesClient) ReportAllocation(colonyName string, executorName string, alloc core.Allocations, prvKey string) error

func (*ColoniesClient) ResolveGenerator

func (client *ColoniesClient) ResolveGenerator(colonyName string, generatorName string, prvKey string) (*core.Generator, error)

func (*ColoniesClient) ResumeColonyAssignments added in v1.8.19

func (client *ColoniesClient) ResumeColonyAssignments(colonyName string, prvKey string) error

func (*ColoniesClient) RunCron

func (client *ColoniesClient) RunCron(cronID string, prvKey string) (*core.Cron, error)

func (*ColoniesClient) SearchLogs added in v1.7.7

func (client *ColoniesClient) SearchLogs(colonyName, text string, days int, count int, prvKey string) ([]*core.Log, error)

func (*ColoniesClient) SendRawMessage

func (client *ColoniesClient) SendRawMessage(jsonString string, insecure bool) (string, error)

SendRawMessage sends a raw JSON message using the underlying backend

func (*ColoniesClient) SetOutput added in v1.4.0

func (client *ColoniesClient) SetOutput(processID string, output []interface{}, prvKey string) error

func (*ColoniesClient) Statistics

func (client *ColoniesClient) Statistics(prvKey string) (*core.Statistics, error)

func (*ColoniesClient) Submit added in v1.0.1

func (client *ColoniesClient) Submit(funcSpec *core.FunctionSpec, prvKey string) (*core.Process, error)

func (*ColoniesClient) SubmitWorkflowSpec

func (client *ColoniesClient) SubmitWorkflowSpec(workflowSpec *core.WorkflowSpec, prvKey string) (*core.ProcessGraph, error)

func (*ColoniesClient) SubscribeProcess

func (client *ColoniesClient) SubscribeProcess(colonyName string, processID string, executorType string, state int, timeout int, prvKey string) (*ProcessSubscription, error)

func (*ColoniesClient) SubscribeProcesses

func (client *ColoniesClient) SubscribeProcesses(colonyName string, executorType string, state int, timeout int, prvKey string) (*ProcessSubscription, error)

func (*ColoniesClient) UpdateResource added in v1.9.0

func (client *ColoniesClient) UpdateResource(resource *core.Resource, prvKey string) (*core.Resource, error)

UpdateResource updates an existing Resource

func (*ColoniesClient) Version

func (client *ColoniesClient) Version() (string, string, error)

type ProcessSubscription

type ProcessSubscription struct {
	ProcessChan chan *core.Process
	ErrChan     chan error
	// contains filtered or unexported fields
}

func (*ProcessSubscription) Close

func (subscription *ProcessSubscription) Close() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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