types

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2018 License: Apache-2.0 Imports: 6 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	// common
	ID, Name       string
	Image, Command string
	State, Status  string // "running"  "Up 13 minutes"
	IPs            []string
	Shell          string

	// k8s
	PodName, ContainerName string
	Namespace, RunningNode string

	// remote location server address
	// use this to locate the container
	// in the proxy mode
	LocServer string

	// exec commands in arguments
	// permit user to execute any command
	// in that container
	ExecCMD string
}

Container instance

type ContainerAct added in v0.1.7

type ContainerAct int
const (
	EXEC ContainerAct = iota
	LOGS
)

type ContainerActionMessage added in v0.1.4

type ContainerActionMessage struct {
	Error   string `json:"err"`
	Code    int    `json:"code"`
	Message string `json:"msg"`
}

ContainerActionMessage tells the web browser the action's status

type Containers added in v0.1.5

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

func (*Containers) Append added in v0.1.5

func (cs *Containers) Append(c Container)

func (*Containers) Find added in v0.1.5

func (cs *Containers) Find(cID string) Container

func (*Containers) Len added in v0.1.5

func (cs *Containers) Len() int

func (*Containers) Set added in v0.1.5

func (cs *Containers) Set(containers []Container)

func (*Containers) SetShell added in v0.1.5

func (cs *Containers) SetShell(cID, shell string)

type InitMessage added in v0.1.5

type InitMessage struct {
	Arguments string `json:"Arguments,omitempty"`
	AuthToken string `json:"AuthToken,omitempty"`
}

type LogOptions added in v0.1.7

type LogOptions struct {
	ID     string
	Follow bool
	Tail   string
}

type ShareTTY added in v0.1.8

type ShareTTY struct {
	TTY
	// contains filtered or unexported fields
}

func NewShareTTY added in v0.1.8

func NewShareTTY(t TTY) *ShareTTY

func (*ShareTTY) Close added in v0.1.8

func (t *ShareTTY) Close() error

func (*ShareTTY) Exit added in v0.1.8

func (t *ShareTTY) Exit() error

func (*ShareTTY) Fork added in v0.1.8

func (t *ShareTTY) Fork(clientIP string) io.ReadCloser

func (*ShareTTY) Read added in v0.1.8

func (t *ShareTTY) Read(p []byte) (n int, err error)

func (*ShareTTY) Write added in v0.1.8

func (t *ShareTTY) Write(p []byte) (n int, err error)

type TTY added in v0.1.5

type TTY interface {
	webtty.Slave
	Exit() error
	// ActiveChan is to notify that the connection is active
	ActiveChan() <-chan struct{}
}

TTY is webtty.Slave with some additional methods.

Jump to

Keyboard shortcuts

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