v1

package
Version: v0.0.0-...-abfb793 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(apis APIs) *mux.Router

NewRouter initializes a new router with registered routes redirected to appropriate handler functions

func ToContainerInstance

func ToContainerInstance(versionedInstance storetypes.VersionedContainerInstance) (models.ContainerInstance, error)

ToContainerInstance translates a container instance represented by the internal structure (storetypes.VersionedContainerInstance) to it's external representation (models.ContainerInstance)

func ToTask

func ToTask(versionedTask storetypes.VersionedTask) (models.Task, error)

ToTask translates a task represented by the internal structure (storetypes.VersionedTask) to it's external representation (models.Task)

Types

type APIs

type APIs struct {
	TaskApis              TaskAPIs
	ContainerInstanceApis ContainerInstanceAPIs
}

func NewAPIs

func NewAPIs(stores store.Stores) APIs

type ContainerInstanceAPIs

type ContainerInstanceAPIs struct {
	// contains filtered or unexported fields
}

ContainerInstanceAPIs encapsulates the backend datastore with which the container instance APIs interact

func NewContainerInstanceAPIs

func NewContainerInstanceAPIs(instanceStore store.ContainerInstanceStore) ContainerInstanceAPIs

NewContainerInstanceAPIs initializes the ContainerInstanceAPIs struct

func (ContainerInstanceAPIs) GetInstance

func (instanceAPIs ContainerInstanceAPIs) GetInstance(w http.ResponseWriter, r *http.Request)

GetInstance gets a container instance using the cluster name to which the instance belongs to and the instance ARN

func (ContainerInstanceAPIs) ListInstances

func (instanceAPIs ContainerInstanceAPIs) ListInstances(w http.ResponseWriter, r *http.Request)

ListInstances lists all container instances across all clusters after applying filters, if any

func (ContainerInstanceAPIs) StreamInstances

func (instanceAPIs ContainerInstanceAPIs) StreamInstances(w http.ResponseWriter, r *http.Request)

StreamInstances streams container instances that change (status, resources, etc.) across all clusters

type TaskAPIs

type TaskAPIs struct {
	// contains filtered or unexported fields
}

TaskAPIs encapsulates the backend datastore with which the task APIs interact

func NewTaskAPIs

func NewTaskAPIs(taskStore store.TaskStore) TaskAPIs

NewTaskAPIs initializes the TaskAPIs struct

func (TaskAPIs) GetTask

func (taskAPIs TaskAPIs) GetTask(w http.ResponseWriter, r *http.Request)

GetTask gets a task using the cluster name to which the task belongs to and the task ARN

func (TaskAPIs) ListTasks

func (taskAPIs TaskAPIs) ListTasks(w http.ResponseWriter, r *http.Request)

ListTasks lists all tasks across all clusters after applying filters, if any

func (TaskAPIs) StreamTasks

func (taskAPIs TaskAPIs) StreamTasks(w http.ResponseWriter, r *http.Request)

StreamTasks streams tasks that change (status etc.) across all clusters

Jump to

Keyboard shortcuts

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