Documentation
¶
Index ¶
- Constants
- Variables
- func InboxName(name string) string
- func NewAgentPermissions(agentID string) jwt.Permissions
- func StreamName(name string) string
- type Client
- func (c *Client) CreateStorage(ctx context.Context, name, description string) error
- func (c *Client) DeleteStorage(ctx context.Context, name string) error
- func (c *Client) Discover(ctx context.Context) (map[string]DiscoverResult, error)
- func (c *Client) GetJob(ctx context.Context, jobID string) (Job, error)
- func (c *Client) GetStorage(ctx context.Context, name string) (*Storage, error)
- func (c *Client) ListAllJobs(ctx context.Context) (map[string]Job, error)
- func (c *Client) ListJobs(ctx context.Context, agentID string) (map[string]Job, error)
- func (c *Client) ListMessages(ctx context.Context, agentID string, subjects []string) ([]Message, error)
- func (c *Client) ListStorage(ctx context.Context) ([]*Storage, error)
- func (c *Client) Register(ctx context.Context, agentID string) (err error)
- func (c *Client) StartWorker(ctx context.Context, agentID, workerID, command string, args, env []string) error
- func (c *Client) StopWorker(ctx context.Context, agentID, workerID string) error
- func (c *Client) WriteWorkerStdin(ctx context.Context, agentID, workerID string) error
- type DiscoverResult
- type Job
- type Message
- type Storage
Constants ¶
View Source
const ( JobStatusPending = "Pending" JobStatusRunning = "Running" JobStatusCancelling = "Cancelling" JobStatusCancelled = "Cancelled" JobStatusFinished = "Finished" JobStatusFailed = "Failed" )
View Source
const InboxPrefix = "_INBOX_"
Variables ¶
View Source
var ( ErrAgentNotFound = errors.New("agent not found") ErrStorageExists = errors.New("storage already exists") ErrStorageNotFound = errors.New("storage not found") ErrFileNotFound = errors.New("file not found") ErrInvalidStorageName = errors.New("invalid storage name") ErrJobNotFound = errors.New("job not found") )
Functions ¶
func NewAgentPermissions ¶
func NewAgentPermissions(agentID string) jwt.Permissions
func StreamName ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateStorage ¶
func (*Client) DeleteStorage ¶
func (*Client) GetStorage ¶
func (*Client) ListAllJobs ¶
func (*Client) ListMessages ¶
func (*Client) StartWorker ¶
func (*Client) StopWorker ¶
type DiscoverResult ¶
type Message ¶
Click to show internal directories.
Click to hide internal directories.