Documentation
¶
Index ¶
- Variables
- func ApplyService(svc *types.Service, c *cluster.Cluster, method string) error
- func FindLatestJobName(c *cluster.Cluster, svcName string) (string, error)
- func GetLogs(c *cluster.Cluster, svcName string, jobName string, timestamps bool) (logs string, err error)
- func GetService(c *cluster.Cluster, name string) (svc *types.Service, err error)
- func JobService(c *cluster.Cluster, name string, token string, endpoint string, ...) (responseBody io.ReadCloser, err error)
- func ListLogs(c *cluster.Cluster, name string, page string) (logMap types.JobsResponse, err error)
- func ListServices(c *cluster.Cluster) (svcList []*types.Service, err error)
- func ListServicesWithContext(ctx context.Context, c *cluster.Cluster) (svcList []*types.Service, err error)
- func RemoveLog(c *cluster.Cluster, svcName, jobName string) error
- func RemoveLogs(c *cluster.Cluster, svcName string, all bool) error
- func RemoveService(c *cluster.Cluster, name string) error
- func RunService(c *cluster.Cluster, name string, token string, endpoint string, ...) (responseBody io.ReadCloser, err error)
- type FDL
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoLogsFound = errors.New("service has no logs")
Functions ¶
func ApplyService ¶
ApplyService creates or edit a service in the specified cluster
func FindLatestJobName ¶ added in v1.12.1
FindLatestJobName returns the job name with the most recent timestamp available
func GetLogs ¶
func GetLogs(c *cluster.Cluster, svcName string, jobName string, timestamps bool) (logs string, err error)
GetLogs get the logs from a service's job
func GetService ¶
GetService gets a service from a cluster
func JobService ¶ added in v1.9.0
func JobService(c *cluster.Cluster, name string, token string, endpoint string, input io.Reader) (responseBody io.ReadCloser, err error)
JobService invokes a service asynchronously
func ListServices ¶
ListServices gets a service from a cluster
func ListServicesWithContext ¶ added in v1.13.0
func ListServicesWithContext(ctx context.Context, c *cluster.Cluster) (svcList []*types.Service, err error)
ListServicesWithContext gets a service from a cluster honouring context cancellation.
func RemoveLogs ¶
RemoveLogs removes completed or all logs (jobs) from a service in the cluster
func RemoveService ¶
RemoveService removes a service from a cluster
Types ¶
type FDL ¶
type FDL struct {
Functions struct {
Oscar []map[string]*types.Service `json:"oscar" binding:"required"`
} `json:"functions" binding:"required"`
StorageProviders *types.StorageProviders `json:"storage_providers,omitempty"`
Clusters map[string]types.Cluster `json:"clusters,omitempty"`
}
FDL represents a Functions Definition Language file
Click to show internal directories.
Click to hide internal directories.