router

package
v0.0.0-...-43d1ab5 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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

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

func (s *StacksRouter) StackInspect(ctx context.Context, id string) (types.Stack, error)

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.

Jump to

Keyboard shortcuts

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