pkg

package
v0.0.0-...-396fbe5 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoverJobIDFromContainer

func DiscoverJobIDFromContainer(container *docker.Container, idPrefix string) (string, error)

Types

type CommandPidFinder

type CommandPidFinder struct {
}

func NewPidFinder

func NewPidFinder() *CommandPidFinder

func (*CommandPidFinder) GetCommandPidByPort

func (finder *CommandPidFinder) GetCommandPidByPort(port string) (int32, error)

type ContainerFinder

type ContainerFinder interface {
	Find() (*docker.Container, error)
}

type ContainerInBridgeModeFinder

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

func (*ContainerInBridgeModeFinder) Find

func (finder *ContainerInBridgeModeFinder) Find() (*docker.Container, error)

type ContainerInHostModeFinder

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

func (*ContainerInHostModeFinder) Find

func (finder *ContainerInHostModeFinder) Find() (*docker.Container, error)

type ContainerJobFinder

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

func (*ContainerJobFinder) FindJobIdFromRequest

func (finder *ContainerJobFinder) FindJobIdFromRequest(request *http.Request) (jobId string, err error)

type ContainerRepository

type ContainerRepository interface {
	FindContainerUsingCommandPID(pid int32) (*docker.Container, error)
	FindContainerUsingIp(ip string) (*docker.Container, error)
}

type DockerContainerRepository

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

implements ContainerRepository

func NewContainerRepository

func NewContainerRepository(client *docker.Client, mesos2IamPrefix string) *DockerContainerRepository

func (*DockerContainerRepository) FindContainerUsingCommandPID

func (repository *DockerContainerRepository) FindContainerUsingCommandPID(pid int32) (*docker.Container, error)

func (*DockerContainerRepository) FindContainerUsingIp

func (repository *DockerContainerRepository) FindContainerUsingIp(ip string) (*docker.Container, error)

type JobFinder

type JobFinder interface {
	FindJobIdFromRequest(request *http.Request) (string, error)
}

func NewJobFinder

func NewJobFinder(repository ContainerRepository, pidFinder PidFinder, hostIp, idPrefix string) JobFinder

type PidFinder

type PidFinder interface {
	GetCommandPidByPort(port string) (int32, error)
}

Jump to

Keyboard shortcuts

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