config

package
v2.0.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	User = &user.User{
		Uid:      "2048",
		Gid:      "2048",
		Username: "action",
		HomeDir:  "/home/action",
	}
	DefaultUserID  = 2048
	DefaultGroupID = 2048
)
View Source
var (
	Version = ""
	Release = ""

	Prefix = "."

	Config ConfigCommon
)

Functions

func Flush

func Flush() error

func Setup

func Setup(ver, rel string) error

Types

type AccessKeyPublic

type AccessKeyPublic struct {
	AccessKey   string `json:"access_key" toml:"access_key"`
	Description string `json:"description,omitempty" toml:"description,omitempty"`
}

type ConfigCommon

type ConfigCommon struct {
	Server  ServerConfig  `json:"server" toml:"server"`
	Zonelet ZoneletConfig `json:"zonelet" toml:"zonelet"`
	Hostlet HostletConfig `json:"hostlet" toml:"hostlet"`
	// contains filtered or unexported fields
}

func (*ConfigCommon) Flush

func (cfg *ConfigCommon) Flush() error

type HostletConfig

type HostletConfig struct {
	HostId  string `json:"host_id" toml:"host_id"`
	LanAddr string `json:"lan_addr" toml:"lan_addr"`

	AccessKey string `json:"access_key" toml:"access_key"`

	PodPath string `json:"pod_path" toml:"pod_path"`

	LxcFsEnable bool `json:"lxc_fs_enable" toml:"lxc_fs_enable"`

	VpcBridgeIP     string `json:"vpc_bridge_ip,omitempty" toml:"vpc_bridge_ip,omitempty"`
	VpcInstanceCIDR string `json:"vpc_instance_cidr,omitempty" toml:"vpc_instance_cidr,omitempty"`

	VpcNetworkDomain string   `json:"vpc_network_domain,omitempty" toml:"vpc_network_domain,omitempty"`
	DnsServers       []string `json:"dns_servers,omitempty" toml:"dns_servers,omitempty"`
	// contains filtered or unexported fields
}

func (*HostletConfig) AuthKey

func (it *HostletConfig) AuthKey() *inauth.AccessKey

type ServerConfig

type ServerConfig struct {
	HttpPort  int      `json:"http_port" toml:"http_port"`
	PeerPort  int      `json:"peer_port" toml:"peer_port"`
	ZoneHosts []string `json:"zone_hosts" toml:"zone_hosts"`
}

type ZoneletConfig

type ZoneletConfig struct {
	ZoneName string `json:"zone_name" toml:"zone_name"`

	VpcBridgeCidr    string `json:"vpc_bridge_cidr,omitempty" toml:"vpc_bridge_cidr,omitempty"`
	VpcInstanceCidr  string `json:"vpc_instance_cidr,omitempty" toml:"vpc_instance_cidr,omitempty"`
	VpcNetworkDomain string `json:"vpc_network_domain,omitempty" toml:"vpc_network_domain,omitempty"`

	AccessKeys []*AccessKeyPublic `json:"access_keys,omitempty" toml:"access_keys,omitempty"`
}

Jump to

Keyboard shortcuts

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