service

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyService

func ApplyService(svc *types.Service, c *cluster.Cluster, method string) error

ApplyService creates or edit a service in the specified cluster

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

func GetService(c *cluster.Cluster, name string) (svc *types.Service, err error)

GetService gets a service from a cluster

func ListLogs

func ListLogs(c *cluster.Cluster, name string) (logMap map[string]*types.JobInfo, err error)

ListLogs returns a map with all the available logs from the given service

func ListServices

func ListServices(c *cluster.Cluster) (svcList []*types.Service, err error)

ListServices gets a service from a cluster

func RemoveLog

func RemoveLog(c *cluster.Cluster, svcName, jobName string) error

RemoveLog removes the specified log (jobName) from a service in the cluster

func RemoveLogs

func RemoveLogs(c *cluster.Cluster, svcName string, all bool) error

RemoveLogs removes completed or all logs (jobs) from a service in the cluster

func RemoveService

func RemoveService(c *cluster.Cluster, name string) error

RemoveService removes a service from a cluster

func RunService added in v1.1.0

func RunService(c *cluster.Cluster, name string, token string, endpoint string, input io.Reader) (responseBody io.ReadCloser, err error)

RunService invokes a service synchronously (a Serverless backend in the cluster is required)

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

func ReadFDL

func ReadFDL(path string) (fdl *FDL, err error)

ReadFDL reads the content of FDL file and returns a valid FDL struct with the scripts and StorageProviders embedded into the services

Jump to

Keyboard shortcuts

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