autorok

package module
v0.0.0-...-3771ab5 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	YAML = "yaml"
	JSON = "json"
)
View Source
const (
	ERROR_ADDR_NOT_IN_NETWORK = "Address not in network."
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Autorok

type Autorok struct {
	Config    *config
	Templates *templates
	Cluster   *cluster
	Router    *mux.Router
}

Autorok is the instance type

func NewAutorok

func NewAutorok(configUrl string) *Autorok

NewAutorok returns a new autorok instance configUrl must be the URL to the configuration file (YAML format)

func (*Autorok) GetRKE

func (a *Autorok) GetRKE()

GetRKE writes the RKE config to stdout

func (*Autorok) Serve

func (a *Autorok) Serve()

Serve runs the application in server mode

type CIDR

type CIDR struct {
	IP   net.IP
	Net  *net.IPNet
	Size string
}

func ParseCIDR

func ParseCIDR(s string) (*CIDR, error)

ParseCIDR parses a string and returns a *CIDR

func (*CIDR) Relative

func (c *CIDR) Relative(r int) (*CIDR, error)

Relative returns a new *CIDR with an IP address increased/decreased by r

func (*CIDR) String

func (c *CIDR) String() string

String returns the string form of the CIDR

Jump to

Keyboard shortcuts

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