types

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VethLogDefaultFilePath   = "/var/log/spider-io/veth.log"
	RouterLogDefaultFilePath = "/var/log/spider-io/router.log"
	LogDefaultMaxSize        = 100 // megabytes
	LogDefaultMaxAge         = 5   // days
	LogDefaultMaxBackups     = 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type K8sArgs

type K8sArgs struct {
	types.CommonArgs
	IP                         net.IP
	K8S_POD_NAME               types.UnmarshallableString //revive:disable-line
	K8S_POD_NAMESPACE          types.UnmarshallableString //revive:disable-line
	K8S_POD_INFRA_CONTAINER_ID types.UnmarshallableString //revive:disable-line
	K8S_POD_UID                types.UnmarshallableString //revive:disable-line
}

K8sArgs is the valid CNI_ARGS used for Kubernetes

type LogOptions

type LogOptions struct {
	LogLevel        string `json:"log_level"`
	LogFilePath     string `json:"log_file"`
	LogFileMaxSize  *int   `json:"log_max_size"`
	LogFileMaxAge   *int   `json:"log_max_age"`
	LogFileMaxCount *int   `json:"log_max_count"`
}

type MoveRouteValue

type MoveRouteValue int32
const (
	MoveValueDirectly MoveRouteValue = iota
	MoveValueAuto
	MoveValueNever
)

type RPFilter

type RPFilter struct {
	// setup host rp_filter
	Enable *bool `json:"enabled,omitempty"`
	// the value of rp_filter, must be 0/1/2
	Value int32 `json:"value,omitempty"`
}

type Veth

type Veth struct {
	types.NetConf
	OnlyHardware   bool     `json:"only_hardware,omitempty"`
	HwPrefix       string   `json:"hardware_prefix,omitempty"`
	ClusterCIDR    []string `json:"cluster_cidr,omitempty"`
	ServiceCIDR    []string `json:"service_cidr,omitempty"`
	AdditionalCIDR []string `json:"additional_cidr,omitempty"`
	// RpFilter
	RPFilter   *RPFilter      `json:"rp_filter,omitempty" `
	MoveRoutes MoveRouteValue `json:"move_routes,omitempty"`
	LogOptions *LogOptions    `json:"log_options,omitempty"`
}

Jump to

Keyboard shortcuts

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