service

package
v0.3.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(
	ctx context.Context,
	mc model.ClientSet,
	dp deptypes.Deployer,
	entity *model.Service,
	opts Options,
) (err error)

func CheckDependencyStatus

func CheckDependencyStatus(ctx context.Context, mc model.ClientSet, entity *model.Service) (bool, error)

CheckDependencyStatus check service dependencies status is ready to apply.

func Create

func Create(
	ctx context.Context,
	mc model.ClientSet,
	dp deptypes.Deployer,
	entity *model.Service,
	opts Options,
) (*model.ServiceOutput, error)

func CreateScheduledServices

func CreateScheduledServices(ctx context.Context, mc model.ClientSet, entities model.Services) (model.Services, error)

CreateScheduledServices creates scheduled services.

func Destroy

func Destroy(
	ctx context.Context,
	mc model.ClientSet,
	dp deptypes.Deployer,
	entity *model.Service,
	opts Options,
) (err error)

func GetSubjectID

func GetSubjectID(entity *model.Service) (object.ID, error)

func IsStatusDeleted

func IsStatusDeleted(entity *model.Service) bool

IsStatusDeleted returns true if the service is deleted.

func IsStatusFalse

func IsStatusFalse(entity *model.Service) bool

IsStatusFalse returns true if the service is in error status.

func IsStatusReady

func IsStatusReady(entity *model.Service) bool

IsStatusReady returns true if the service is ready.

func SetServiceStatusScheduled

func SetServiceStatusScheduled(ctx context.Context, mc model.ClientSet, entity *model.Service) error

SetServiceStatusScheduled sets the status of the service to scheduled.

func SetSubjectID

func SetSubjectID(ctx context.Context, services ...*model.Service) error

func TopologicalSortServices

func TopologicalSortServices(services model.Services) (model.Services, error)

TopologicalSortServices sorts the services by dependencies.

func UpdateStatus

func UpdateStatus(
	ctx context.Context,
	mc model.ClientSet,
	entity *model.Service,
) error

Types

type Options

type Options struct {
	TlsCertified bool
}

Options for deploy or destroy.

type ServiceNode

type ServiceNode struct {
	ID       object.ID      `json:"id"`
	Name     string         `json:"name"`
	Service  *model.Service `json:"service"`
	Children []*ServiceNode `json:"children"`
}

func NewServiceNodes

func NewServiceNodes(services model.Services) ([]*ServiceNode, error)

NewServiceNodes returns a list of service nodes from the given services.

func TopologicalSortServiceNodes

func TopologicalSortServiceNodes(nodes []*ServiceNode) []*ServiceNode

TopologicalSortServiceNodes sorts the service nodes by dependencies.

Jump to

Keyboard shortcuts

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