handlers

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2018 License: Apache-2.0 Imports: 57 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainersHandlersImpl

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

ContainersHandlersImpl is the receiver for all of the exec handler methods

func (*ContainersHandlersImpl) CommitHandler

func (handler *ContainersHandlersImpl) CommitHandler(params containers.CommitParams) middleware.Responder

func (*ContainersHandlersImpl) Configure

func (handler *ContainersHandlersImpl) Configure(api *operations.PortLayerAPI, handlerCtx *HandlerContext)

Configure assigns functions to all the exec api handlers

func (*ContainersHandlersImpl) ContainerSignalHandler

func (handler *ContainersHandlersImpl) ContainerSignalHandler(params containers.ContainerSignalParams) middleware.Responder

func (*ContainersHandlersImpl) ContainerWaitHandler

func (handler *ContainersHandlersImpl) ContainerWaitHandler(params containers.ContainerWaitParams) middleware.Responder

func (*ContainersHandlersImpl) CreateHandler

func (handler *ContainersHandlersImpl) CreateHandler(params containers.CreateParams) middleware.Responder

CreateHandler creates a new container

func (*ContainersHandlersImpl) GetContainerInfoHandler

func (handler *ContainersHandlersImpl) GetContainerInfoHandler(params containers.GetContainerInfoParams) middleware.Responder

func (*ContainersHandlersImpl) GetContainerListHandler

func (handler *ContainersHandlersImpl) GetContainerListHandler(params containers.GetContainerListParams) middleware.Responder

func (*ContainersHandlersImpl) GetContainerLogsHandler

func (handler *ContainersHandlersImpl) GetContainerLogsHandler(params containers.GetContainerLogsParams) middleware.Responder

func (*ContainersHandlersImpl) GetContainerStatsHandler

func (handler *ContainersHandlersImpl) GetContainerStatsHandler(params containers.GetContainerStatsParams) middleware.Responder

func (*ContainersHandlersImpl) GetHandler

func (handler *ContainersHandlersImpl) GetHandler(params containers.GetParams) middleware.Responder

func (*ContainersHandlersImpl) GetStateHandler

func (handler *ContainersHandlersImpl) GetStateHandler(params containers.GetStateParams) middleware.Responder

GetStateHandler returns the state AS HELD IN THE HANDLE. This state is not updated and should not be assumed to represent actual state at the time of call. This method is provided so that a single consistent view of state data can be used for making decisions. The handle used contains a changeVersion that will protect against underlying state changes if attempting to apply modifications.

func (*ContainersHandlersImpl) RemoveContainerHandler

func (handler *ContainersHandlersImpl) RemoveContainerHandler(params containers.ContainerRemoveParams) middleware.Responder

func (*ContainersHandlersImpl) RenameContainerHandler

func (handler *ContainersHandlersImpl) RenameContainerHandler(params containers.ContainerRenameParams) middleware.Responder

func (*ContainersHandlersImpl) StateChangeHandler

func (handler *ContainersHandlersImpl) StateChangeHandler(params containers.StateChangeParams) middleware.Responder

StateChangeHandler changes the state of a container

type EventsHandlerImpl

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

EventHandlerImpl is the receiver for all of the event handler methods

func (*EventsHandlerImpl) Configure

func (handler *EventsHandlerImpl) Configure(api *operations.PortLayerAPI, handlerCtx *HandlerContext)

Configure assigns functions to all the exec api handlers

func (*EventsHandlerImpl) GetEventsHandler

func (handler *EventsHandlerImpl) GetEventsHandler(params events.GetEventsParams) middleware.Responder

GetEventsHandler provides a stream of events

type FlushingReader

type FlushingReader struct {
	io.Reader
	io.WriterTo
	// contains filtered or unexported fields
}

func NewFlushingReader

func NewFlushingReader(rdr io.Reader) *FlushingReader

func NewFlushingReaderWithInitBytes

func NewFlushingReaderWithInitBytes(rdr io.Reader, initBytes []byte) *FlushingReader

func (*FlushingReader) AddFlusher

func (d *FlushingReader) AddFlusher(flusher GenericFlusher)

func (*FlushingReader) WriteTo

func (d *FlushingReader) WriteTo(w io.Writer) (written int64, err error)

WriteTo is derived from go's io.Copy. We use a smaller buffer so as to not hold up writing out data. Go's version allocates 32k, and the Read will wait till buffer is filled (unless EOF is encountered). Also, we force a flush if a flusher is added. We've seen cases where the last bit of data for a screen doesn't reach the docker engine api server. The flush solves that issue.

type GenericFlusher

type GenericFlusher interface {
	Flush()
}

GenericFlusher is a custom reader to allow us to detach cleanly during an io.Copy

type HandlerContext

type HandlerContext struct {
	Session *session.Session
}

HandlerContext is set of shared objects for the port layer server handlers

type InteractionHandlersImpl

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

InteractionHandlersImpl is the receiver for all of the interaction handler methods

func (*InteractionHandlersImpl) BindHandler

BindHandler calls the Bind

func (*InteractionHandlersImpl) Configure

func (*InteractionHandlersImpl) ContainerCloseStdinHandler

ContainerCloseStdinHandler closes the stdin, it returns an error if there is no active connection between portlayer and the tether

func (*InteractionHandlersImpl) ContainerGetStderrHandler

ContainerGetStderrHandler returns the stderr

func (*InteractionHandlersImpl) ContainerGetStdoutHandler

ContainerGetStdoutHandler returns the stdout

func (*InteractionHandlersImpl) ContainerResizeHandler

ContainerResizeHandler calls resize

func (*InteractionHandlersImpl) ContainerSetStdinHandler

ContainerSetStdinHandler returns the stdin

func (*InteractionHandlersImpl) JoinHandler

JoinHandler calls the Join

func (*InteractionHandlersImpl) UnbindHandler

UnbindHandler calls the Unbind

type KvHandlersImpl

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

func (*KvHandlersImpl) Configure

func (handler *KvHandlersImpl) Configure(api *operations.PortLayerAPI, handlerCtx *HandlerContext)

func (*KvHandlersImpl) DeleteValueHandler

func (handler *KvHandlersImpl) DeleteValueHandler(params kv.DeleteValueParams) middleware.Responder

func (*KvHandlersImpl) GetValueHandler

func (handler *KvHandlersImpl) GetValueHandler(params kv.GetValueParams) middleware.Responder

func (*KvHandlersImpl) PutValueHandler

func (handler *KvHandlersImpl) PutValueHandler(params kv.PutValueParams) middleware.Responder

type LoggingHandlersImpl

type LoggingHandlersImpl struct {
}

LoggingHandlersImpl is the receiver for all of the logging handler methods

func (*LoggingHandlersImpl) BindHandler

BindHandler calls the Bind

func (*LoggingHandlersImpl) Configure

Configure initializes the handler

func (*LoggingHandlersImpl) JoinHandler

JoinHandler calls the Join

func (*LoggingHandlersImpl) UnbindHandler

UnbindHandler calls the Unbind

type MiscHandlersImpl

type MiscHandlersImpl struct{}

MiscHandlersImpl is the receiver for all the misc handler methods

func (*MiscHandlersImpl) Configure

func (h *MiscHandlersImpl) Configure(api *operations.PortLayerAPI, handlerCtx *HandlerContext)

Configure assigns functions to all the miscellaneous api handlers

func (*MiscHandlersImpl) GetVCHInfo

GetVCHInfo returns VCH-related info for a `docker info` call

func (*MiscHandlersImpl) Ping

Ping sends an OK response to let the client know the server is up

type ScopesHandlersImpl

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

ScopesHandlersImpl is the receiver for all of the storage handler methods

func (*ScopesHandlersImpl) Configure

func (handler *ScopesHandlersImpl) Configure(api *operations.PortLayerAPI, handlerCtx *HandlerContext)

Configure assigns functions to all the scopes api handlers

func (*ScopesHandlersImpl) ScopesAddContainer

func (handler *ScopesHandlersImpl) ScopesAddContainer(params scopes.AddContainerParams) middleware.Responder

func (*ScopesHandlersImpl) ScopesBindContainer

func (handler *ScopesHandlersImpl) ScopesBindContainer(params scopes.BindContainerParams) middleware.Responder

func (*ScopesHandlersImpl) ScopesCreate

func (handler *ScopesHandlersImpl) ScopesCreate(params scopes.CreateScopeParams) middleware.Responder

func (*ScopesHandlersImpl) ScopesDelete

func (handler *ScopesHandlersImpl) ScopesDelete(params scopes.DeleteScopeParams) middleware.Responder

func (*ScopesHandlersImpl) ScopesGetContainerEndpoints

func (handler *ScopesHandlersImpl) ScopesGetContainerEndpoints(params scopes.GetContainerEndpointsParams) middleware.Responder

func (*ScopesHandlersImpl) ScopesList

func (handler *ScopesHandlersImpl) ScopesList(params scopes.ListParams) middleware.Responder

func (*ScopesHandlersImpl) ScopesListAll

func (handler *ScopesHandlersImpl) ScopesListAll(params scopes.ListAllParams) middleware.Responder

func (*ScopesHandlersImpl) ScopesRemoveContainer

func (handler *ScopesHandlersImpl) ScopesRemoveContainer(params scopes.RemoveContainerParams) middleware.Responder

func (*ScopesHandlersImpl) ScopesUnbindContainer

func (handler *ScopesHandlersImpl) ScopesUnbindContainer(params scopes.UnbindContainerParams) middleware.Responder

type StorageHandlersImpl

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

StorageHandlersImpl is the receiver for all of the storage handler methods

func (*StorageHandlersImpl) Configure

func (h *StorageHandlersImpl) Configure(api *operations.PortLayerAPI, handlerCtx *HandlerContext)

Configure assigns functions to all the storage api handlers

func (*StorageHandlersImpl) CreateImageStore

CreateImageStore creates a new image store

func (*StorageHandlersImpl) CreateVolume

CreateVolume : Create a Volume

func (*StorageHandlersImpl) DeleteImage

DeleteImage deletes an image from a store

func (*StorageHandlersImpl) ExportArchive

ExportArchive creates a tar archive and returns to caller

func (*StorageHandlersImpl) GetImage

GetImage retrieves an image from a store

func (*StorageHandlersImpl) GetVolume

GetVolume : Gets a handle to a volume

func (*StorageHandlersImpl) ImportArchive

ImportArchive takes an input tar archive and unpacks to destination

func (*StorageHandlersImpl) ListImages

ListImages returns a list of images in a store

func (*StorageHandlersImpl) RemoveVolume

RemoveVolume : Remove a Volume from existence

func (*StorageHandlersImpl) StatPath

StatPath returns file info on the target path of a container copy

func (*StorageHandlersImpl) VolumeJoin

VolumeJoin : modifies the config spec of a container to mount the specified container

func (*StorageHandlersImpl) VolumeStoresList

VolumeStoresList lists the configured volume stores and their datastore path URIs.

func (*StorageHandlersImpl) VolumesList

VolumesList : Lists available volumes for use

func (*StorageHandlersImpl) WriteImage

WriteImage writes an image to an image store

type StreamOutputHandler

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

StreamOutputHandler is a custom return handler that provides common stream handling across the API.

func NewStreamOutputHandler

func NewStreamOutputHandler(name string) *StreamOutputHandler

NewStreamOutputHandler creates StreamOutputHandler with default headers values

func (*StreamOutputHandler) WithPayload

func (s *StreamOutputHandler) WithPayload(payload *FlushingReader, id string, cleanup func()) *StreamOutputHandler

WithPayload adds the payload to the container set stdin internal server error response

func (*StreamOutputHandler) WriteResponse

func (s *StreamOutputHandler) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type TaskHandlersImpl

type TaskHandlersImpl struct {
}

TaskHandlersImpl is the receiver for all of the task handler methods

func (*TaskHandlersImpl) BindHandler

func (handler *TaskHandlersImpl) BindHandler(params tasks.BindParams) middleware.Responder

BindHandler calls the Bind

func (*TaskHandlersImpl) Configure

func (handler *TaskHandlersImpl) Configure(api *operations.PortLayerAPI, _ *HandlerContext)

func (*TaskHandlersImpl) InspectHandler

func (handler *TaskHandlersImpl) InspectHandler(params tasks.InspectParams) middleware.Responder

InspectHandler calls inspect

func (*TaskHandlersImpl) JoinHandler

func (handler *TaskHandlersImpl) JoinHandler(params tasks.JoinParams) middleware.Responder

JoinHandler calls the Join

func (*TaskHandlersImpl) RemoveHandler

func (handler *TaskHandlersImpl) RemoveHandler(params tasks.RemoveParams) middleware.Responder

RemoveHandler calls remove

func (*TaskHandlersImpl) UnbindHandler

func (handler *TaskHandlersImpl) UnbindHandler(params tasks.UnbindParams) middleware.Responder

UnbindHandler calls the Unbind

func (*TaskHandlersImpl) WaitHandler

func (handler *TaskHandlersImpl) WaitHandler(params tasks.WaitParams) middleware.Responder

WaitHandler calls wait

Jump to

Keyboard shortcuts

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