Documentation ¶
Index ¶
- func Apply(ctx context.Context, mc model.ClientSet, dp deptypes.Deployer, ...) (err error)
- func CheckDependencyStatus(ctx context.Context, mc model.ClientSet, entity *model.Service) (bool, error)
- func Create(ctx context.Context, mc model.ClientSet, dp deptypes.Deployer, ...) (*model.ServiceOutput, error)
- func CreateScheduledServices(ctx context.Context, mc model.ClientSet, entities model.Services) (model.Services, error)
- func Destroy(ctx context.Context, mc model.ClientSet, dp deptypes.Deployer, ...) (err error)
- func GetSubjectID(entity *model.Service) (object.ID, error)
- func IsStatusDeleted(entity *model.Service) bool
- func IsStatusFalse(entity *model.Service) bool
- func IsStatusReady(entity *model.Service) bool
- func SetServiceStatusScheduled(ctx context.Context, mc model.ClientSet, entity *model.Service) error
- func SetSubjectID(ctx context.Context, services ...*model.Service) error
- func TopologicalSortServices(services model.Services) (model.Services, error)
- func UpdateStatus(ctx context.Context, mc model.ClientSet, entity *model.Service) error
- type Options
- type ServiceNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 CreateScheduledServices ¶
func CreateScheduledServices(ctx context.Context, mc model.ClientSet, entities model.Services) (model.Services, error)
CreateScheduledServices creates scheduled services.
func IsStatusDeleted ¶
IsStatusDeleted returns true if the service is deleted.
func IsStatusFalse ¶
IsStatusFalse returns true if the service is in error status.
func IsStatusReady ¶
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 TopologicalSortServices ¶
TopologicalSortServices sorts the services by dependencies.
Types ¶
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.
Click to show internal directories.
Click to hide internal directories.