types

package
Version: v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResourceTypeVeth  = "veth"
	ResourceTypeENI   = "eni"
	ResourceTypeENIIP = "eniIp"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Configure

type Configure struct {
	Version       string              `yaml:"version" json:"version"`
	AccessId      string              `yaml:"access_key" json:"access_key"`
	AccessSecret  string              `yaml:"access_secret" json:"access_secret"`
	ServiceCIDR   string              `yaml:"service_cidr" json:"service_cidr"`
	VSwitches     map[string][]string `yaml:"vswitches" json:"vswitches"`
	MaxPoolSize   int                 `yaml:"max_pool_size" json:"max_pool_size"`
	MinPoolSize   int                 `yaml:"min_pool_size" json:"min_pool_size"`
	Prefix        string              `yaml:"prefix" json:"prefix"`
	SecurityGroup string              `yaml:"security_group" json:"security_group"`
	HotPlug       string              `yaml:"hot_plug" json:"hot_plug"`
	EniCapRatio   float64             `yaml:"eni_cap_ratio" json:"eni_cap_ratio"`
	EniCapShift   int                 `yaml:"eni_cap_ratio" json:"eni_cap_ratio"`
}

type ENI

type ENI struct {
	ID           string
	Name         string
	Address      net.IPNet
	MAC          string
	Gateway      net.IP
	DeviceNumber int32
	MaxIPs       int
}

func (*ENI) GetResourceId added in v1.0.10

func (eni *ENI) GetResourceId() string

func (*ENI) GetType added in v1.0.10

func (eni *ENI) GetType() string

type ENIIP added in v1.0.10

type ENIIP struct {
	Eni        *ENI
	SecAddress net.IP
}

func (*ENIIP) GetResourceId added in v1.0.10

func (eniIP *ENIIP) GetResourceId() string

func (*ENIIP) GetType added in v1.0.10

func (eniIP *ENIIP) GetType() string

type NetConf

type NetConf struct {
	types.NetConf
	IP string `ip:"ip"` //占位,暂不支持。考虑使用pod annotation
}

func NewConf

func NewConf(args *skel.CmdArgs) (*NetConf, error)

type NetworkResource added in v1.0.10

type NetworkResource interface {
	GetResourceId() string
	GetType() string
}

type PoolConfig

type PoolConfig struct {
	MaxPoolSize   int
	MinPoolSize   int
	VPC           string
	Zone          string
	VSwitch       []string
	Region        common.Region
	SecurityGroup string
	InstanceID    string
	AccessId      string
	AccessSecret  string
	HotPlug       bool
	EniCapRatio   float64
	EniCapShift   int
}

type ResourceCreateArgs added in v1.0.10

type ResourceCreateArgs struct {
	VethCreateArgs *VethCreateArgs
}

type ResourceDestroyArgs added in v1.0.10

type ResourceDestroyArgs struct {
}

type TrafficShappingRule

type TrafficShappingRule struct {
	ID        string
	Source    string
	Bandwidth string
	Classify  int
}

type Veth added in v1.0.10

type Veth struct {
	HostVeth string
}

func (*Veth) GetResourceId added in v1.0.10

func (veth *Veth) GetResourceId() string

func (*Veth) GetType added in v1.0.10

func (veth *Veth) GetType() string

type VethCreateArgs added in v1.0.10

type VethCreateArgs struct {
	PodName      string
	PodNamespace string
}

Source Files

Jump to

Keyboard shortcuts

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