types

package
v0.0.0-...-846387b Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateETCDV3Client

func CreateETCDV3Client(conf ETCDConf) (*clientv3.Client, error)

CreateETCDV3Client create etcd v3 client

func GetKeyField

func GetKeyField(keyString string, v reflect.Value) reflect.Value

GetKeyField is a helper function to receive Values Values that represent a pointer to a struct

func LoadArgs

func LoadArgs(args string, container interface{}) error

LoadArgs parses args from a string in the form "K=V;K2=V2;..."

Types

type ETCDConf

type ETCDConf struct {
	URLs        []string `json:"urls"`
	Username    string   `json:"username"`
	Password    string   `json:"password"`
	PeerTimeOut string   `json:"timeout"`
}

ETCDConf etcd配置

type IPAM

type IPAM struct {
	Type        string   `json:"type"`
	IPV4        bool     `json:"ipv4"`
	IPV6        bool     `json:"ipv6"`
	ReginNetAPI string   `json:"region_net_api"`
	ReginToken  string   `json:"region_token"`
	Route       []*Route `json:"route"`
}

IPAM ip管理器配置

type IPInfo

type IPInfo struct {
	ContainerID string    `json:"containerID"`
	IPNet       net.IPNet `json:"ipnet"`
	Getway      net.IP    `json:"getway"`
}

IPInfo ipam返回信息

type K8sArgs

type K8sArgs struct {
	types.CommonArgs
	IP                         net.IP
	K8S_POD_NAME               types.UnmarshallableString
	K8S_POD_NAMESPACE          types.UnmarshallableString
	K8S_POD_INFRA_CONTAINER_ID types.UnmarshallableString
}

K8sArgs is the valid CNI_ARGS used for Kubernetes

type Kubernetes

type Kubernetes struct {
	K8sAPIRoot string `json:"k8s_api_root"`
	Kubeconfig string `json:"kubeconfig"`
	NodeName   string `json:"node_name"`
}

Kubernetes a K8s specific struct to hold config

type Options

type Options struct {
	Name              string               `json:"name"`
	Type              string               `json:"type"`
	LogLevel          string               `json:"log_level"`
	LogPath           string               `json:"log_path"`
	MidoNetHostUUID   string               `json:"midonet_host_uuid"`
	MidoNetRouterCIDR string               `json:"midonet_router_cidr"`
	MidoNetBridgeCIDR string               `json:"midonet_bridge_cidr"`
	IPAM              IPAM                 `json:"ipam"`
	MTU               int                  `json:"mtu"`
	VethCtrlType      string               `json:"veth_ctrl_type"`
	MidoNetAPIConf    types.MidoNetAPIConf `json:"midonet_api"`
	ETCDConf          ETCDConf             `json:"etcd_conf"`
	Log               *logrus.Entry
}

Options cni配置

func (*Options) Default

func (c *Options) Default() error

Default 赋值

func (*Options) SetLog

func (c *Options) SetLog() error

SetLog 设置日志

type ReginNewIP

type ReginNewIP struct {
	HostID        string `json:"host_id"`
	CtnID         string `json:"ctn_id"`
	ReplicaID     string `json:"replica_id"`
	DeployVersion string `json:"deploy_version"`
	PodName       string `json:"pod_name"`
}

ReginNewIP 从region申请ip信息

type Route

type Route struct {
	Net     string `json:"net"`
	NetMask string `json:"netmask"`
	GW      string `json:"gw"`
}

Route 路由规则

Jump to

Keyboard shortcuts

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