api

package
v0.0.0-...-f267496 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChannelData

func ChannelData(data ...interface{}) (result []interface{})

ChannelData wraps any number of values into a JSON array for channel data usage

Types

type ActorRunner

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

ActorRunner stores running tasks along with channels to deliver results.

func NewActorRunner

func NewActorRunner() *ActorRunner

NewActorRunner returns a new ActorRunner.

func (*ActorRunner) Create

func (a *ActorRunner) Create(actorName, stdin string) *ActorRunnerID

Create sends a new actirCreateParams struct to an appropriate channel to be executed and returns a pointer to a new ActorRunnerID.

func (*ActorRunner) GetStatus

func (a *ActorRunner) GetStatus(id *ActorRunnerID, wait bool) *ActorStatus

GetStatus returns a status of a given ActorRunnerID.

func (*ActorRunner) StreamOutput

func (a *ActorRunner) StreamOutput(id ActorRunnerID, target io.WriteCloser) error

StreamOutput sends a new actirStreanParams struct to an appropriate channel and returns an error.

type ActorRunnerID

type ActorRunnerID struct {
	uuid.UUID
}

ActorRunnerID represents an unique of a running actor.

func NewActorRunnerID

func NewActorRunnerID() ActorRunnerID

NewActorRunnerID returns a new ActorRunnerID.

type ActorStatus

type ActorStatus struct {
	ID     ActorRunnerID
	Result *executor.Result
}

ActorStatus represents the status of a running actor.

type CKey

type CKey string

CKey represents a key to be used in context.Context.

type EndpointEntry

type EndpointEntry struct {
	Method      string
	Endpoint    string
	IsPrefix    bool
	NeedsStrip  bool
	HandlerFunc http.HandlerFunc
}

EndpointEntry represents an endpoint exposed by the daemon.

func GetEndpoints

func GetEndpoints() []EndpointEntry

GetEndpoints should return a slice of all endpoints that the daemon exposes.

type ExcludedTCPPorts

type ExcludedTCPPorts struct {
	TCP PortMapping `json:"tcp"`
	UDP PortMapping `json:"udp"`
}

ExcludedTCPPorts represents the high level JSON object containing all ports that should not be exposed by the target host.

type NoSuchTaskError

type NoSuchTaskError struct{}

NoSuchTaskError represents a customized error used when the task is not found.

func (NoSuchTaskError) Error

func (n NoSuchTaskError) Error() string

Error implements the error interface for NoSuchTaskError.

type ObjValue

type ObjValue struct {
	Value interface{} `json:"value"`
}

ObjValue wraps any value into a JSON object with a key "value".

type PortForwarding

type PortForwarding struct {
	Protocol    string `json:"protocol"`
	ExposedPort uint16 `json:"exposed_port"`
	Port        uint16 `json:"port"`
}

PortForwarding is a mapping between a port in the container and a port exposed by the host.

type PortForwardingSlice

type PortForwardingSlice []PortForwarding

PortForwardingSlice contains all ports that should be exposed by the host.

func (PortForwardingSlice) MarshalJSON

func (f PortForwardingSlice) MarshalJSON() ([]byte, error)

MarshalJSON makes sure that a nil PortForwardingSlice becomes an empty JSON list.

type PortMapping

type PortMapping map[uint16]map[string]string

PortMapping represents a map of ports and the names of their respective services.

func (PortMapping) MarshalJSON

func (m PortMapping) MarshalJSON() ([]byte, error)

MarshalJSON makes sure that a nil PortMapping becomes an empty JSON object.

type TCPPortsUserMapping

type TCPPortsUserMapping struct {
	Ports PortForwardingSlice `json:"ports"`
}

TCPPortsUserMapping represents the high level JSON object containing all ports that should be exposed by the host.

Jump to

Keyboard shortcuts

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