network

package
v0.0.0-...-23c69d6 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: Apache-2.0, BSD-2-Clause Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const DBBucketNetwork = "network/v1"

Variables

View Source
var (
	ErrInvalidParams = errors.New("invalid network params")
)

Functions

func GetTapFileForShim

func GetTapFileForShim(sandboxID, requestedTapName string) (*os.File, error)

GetTapFileForShim obtains a one-shot TAP file from the runtime. The caller owns the returned file and must close it after passing it via SCM_RIGHTS.

Types

type Config

type Config struct {
	EthName      string `toml:"eth_name"`
	TapInitNum   int    `toml:"tap_init_num"`
	CIDR         string `toml:"cidr"`
	ObjectDir    string `toml:"object_dir"`
	MVMInnerIP   string `toml:"mvm_inner_ip"`
	MVMMacAddr   string `toml:"mvm_mac_addr"`
	MvmGwDestIP  string `toml:"mvm_gw_dest_ip"`
	MvmGwMacAddr string `toml:"mvm_gw_mac_addr"`
	MvmMask      int    `toml:"mvm_mask"`
	MvmMtu       int    `toml:"mvm_mtu"`

	CheckIntervalTime      tomlext.Duration `toml:"check_interval_in_sec"`
	ReportStatIntervalTime tomlext.Duration `toml:"report_stat_interval_in_sec"`
	AppMark                string           `toml:"app_mark"`

	WatchStream      bool             `toml:"watch_stream"`
	RedisConfPath    string           `toml:"redis_conf_path"`
	StreamNamePrefix string           `toml:"stream_name_prefix"`
	StreamKey        string           `toml:"stream_key"`
	StreamBlockTime  tomlext.Duration `toml:"stream_block_time"`

	RootPath string `toml:"root_path"`

	CubeEgressAdminURL    string           `toml:"cube_egress_admin_url"`
	CubeEgressPushTimeout tomlext.Duration `toml:"cube_egress_push_timeout"`
	CubeRouterEnable      bool             `toml:"cube_router_enable"`
	CubeRouterCIDR        string           `toml:"cube_router_cidr"`
	CubeRouterMacAddr     string           `toml:"cube_router_mac_addr"`
}

Directories

Path Synopsis
tools
testarp command
testtap command

Jump to

Keyboard shortcuts

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