service

package
v0.0.0-...-fe4f5a4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List(client k8s.IK8S, namespace string) (map[string]*Service, *e.Err)

func Logs

func Logs(client k8s.IK8S, namespace string, opts *ServiceLogsOption, close chan bool) *e.Err

func Update

func Update(client k8s.IK8S, namespace, name string, config *ServiceConfig) *e.Err

Types

type Container

type Container struct {
	Name       string   `json:"name"`
	Image      string   `json:"image"`
	WorkingDir string   `json:"workdir"`
	Command    []string `json:"command"`
	Args       []string `json:"args"`
	PortList   []Port   `json:"ports"`
	EnvList    []Env    `json:"env"`
	VolumeList []Volume `json:"volumes"`
}

type Env

type Env struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type Pod

type Pod struct {
	Name          string            `json:"name"`
	Namespace     string            `json:"namespace"`
	Status        string            `json:"status"`
	Labels        map[string]string `json:"labels"`
	ContainerList []Container       `json:"containers"`
}

type Port

type Port struct {
	Name      string `json:"name"`
	Container int32  `json:"container"`
	Protocol  string `json:"protocol"`
}

type Service

type Service struct {
	Name      string            `json:"name"`
	Namespace string            `json:"namespace"`
	Labels    map[string]string `json:"labels"`
	Scale     int32             `json:"scale"`
	Template  struct {
		ContainerList []Container `json:"containers"`
	} `json:"tempalte"`
	PodList []Pod `json:"pods"`
}

func Deploy

func Deploy(client k8s.IK8S, namespace string, config *v1beta1.Deployment) (*Service, *e.Err)

func Get

func Get(client k8s.IK8S, namespace, name string) (*Service, *e.Err)

type ServiceConfig

type ServiceConfig struct {
	Replicas   int32
	Containers []container.Container
}

type ServiceLogsOption

type ServiceLogsOption struct {
	Stream       io.Writer
	Pod          string
	Container    string
	Follow       bool
	Previous     bool
	Timestamps   bool
	SinceSeconds *int64
	SinceTime    *time.Time
	TailLines    *int64
	LimitBytes   *int64
}

type Volume

type Volume struct {
	Name     string `json:"name"`
	Path     string `json:"path"`
	Readonly bool   `json:"readonly"`
}

Directories

Path Synopsis
resource
pod

Jump to

Keyboard shortcuts

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