Documentation ¶
Index ¶
- type StacksRouter
- func (s *StacksRouter) RegisterBackend(orch types.OrchestratorChoice, stackClient client.StackAPIClient)
- func (s *StacksRouter) StackCreate(ctx context.Context, spec types.StackSpec, options types.StackCreateOptions) (types.StackCreateResponse, error)
- func (s *StacksRouter) StackDelete(ctx context.Context, id string) error
- func (s *StacksRouter) StackInspect(ctx context.Context, id string) (types.Stack, error)
- func (s *StacksRouter) StackList(ctx context.Context, options types.StackListOptions) ([]types.Stack, error)
- func (s *StacksRouter) StackUpdate(ctx context.Context, id string, version types.Version, spec types.StackSpec, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StacksRouter ¶
type StacksRouter struct {
// contains filtered or unexported fields
}
StacksRouter is a router for the Stacks API, responsible for routing requests to specific orchestrator backends. It implements the StackAPIClient interface.
func NewStacksRouter ¶
func NewStacksRouter() *StacksRouter
NewStacksRouter creates a new StacksRouter
func (*StacksRouter) RegisterBackend ¶
func (s *StacksRouter) RegisterBackend(orch types.OrchestratorChoice, stackClient client.StackAPIClient)
RegisterBackend registers a new orchestration backend for the StacksRouter. If a backend already exists for the specified orchestrator type, it will be overridden.
func (*StacksRouter) StackCreate ¶
func (s *StacksRouter) StackCreate(ctx context.Context, spec types.StackSpec, options types.StackCreateOptions) (types.StackCreateResponse, error)
StackCreate creates a new stack.
func (*StacksRouter) StackDelete ¶
func (s *StacksRouter) StackDelete(ctx context.Context, id string) error
StackDelete deletes a stack from all backends. StackDelete should be idempotent so any errors need to be reported back.
func (*StacksRouter) StackInspect ¶
StackInspect attempts to inspect a stack across all backends in parallel, and returns the first response.
func (*StacksRouter) StackList ¶
func (s *StacksRouter) StackList(ctx context.Context, options types.StackListOptions) ([]types.Stack, error)
StackList lists all stacks across all backends.
func (*StacksRouter) StackUpdate ¶
func (s *StacksRouter) StackUpdate(ctx context.Context, id string, version types.Version, spec types.StackSpec, options types.StackUpdateOptions) error
StackUpdate identifies which backend an existing stack is located at, and calls the update operation of that backend.