service

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: Apache-2.0 Imports: 18 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoLogsFound = errors.New("service has no logs")

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 FindLatestJobName added in v1.12.1

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

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

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

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 ListLogs

func ListLogs(c *cluster.Cluster, name string, page string) (logMap types.JobsResponse, 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 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 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