topology

package
v0.0.0-...-d8f7d12 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Watch

func Watch(topologyRepository, localRepositoryDir, topologyDir string,
	checkInterval time.Duration,
	logger log.DebugLogger) (<-chan *Topology, error)

Types

type Directory

type Directory struct {
	Name        string
	Directories []*Directory        `json:",omitempty"`
	Machines    []*fm_proto.Machine `json:",omitempty"`
	Subnets     []*Subnet           `json:",omitempty"`
	Tags        tags.Tags           `json:",omitempty"`
	// contains filtered or unexported fields
}

func (*Directory) GetPath

func (directory *Directory) GetPath() string

func (*Directory) Walk

func (directory *Directory) Walk(fn func(*Directory) error) error

type Subnet

type Subnet struct {
	hyper_proto.Subnet
	FirstAutoIP net.IP   `json:",omitempty"`
	LastAutoIP  net.IP   `json:",omitempty"`
	ReservedIPs []net.IP `json:",omitempty"`
	// contains filtered or unexported fields
}

func (*Subnet) CheckIfIpIsReserved

func (s *Subnet) CheckIfIpIsReserved(ipAddr string) bool

func (*Subnet) Shrink

func (subnet *Subnet) Shrink()

type Topology

type Topology struct {
	Root *Directory
	// contains filtered or unexported fields
}

func Load

func Load(topologyDir string) (*Topology, error)

func (*Topology) CheckIfIpIsReserved

func (t *Topology) CheckIfIpIsReserved(ipAddr string) bool

func (*Topology) CheckIfMachineHasSubnet

func (t *Topology) CheckIfMachineHasSubnet(name, subnetId string) (
	bool, error)

func (*Topology) FindDirectory

func (t *Topology) FindDirectory(dirname string) (*Directory, error)

func (*Topology) GetLocationOfMachine

func (t *Topology) GetLocationOfMachine(name string) (string, error)

func (*Topology) GetNumMachines

func (t *Topology) GetNumMachines() uint

func (*Topology) GetSubnetsForMachine

func (t *Topology) GetSubnetsForMachine(name string) ([]*Subnet, error)

func (*Topology) ListMachines

func (t *Topology) ListMachines(dirname string) ([]*fm_proto.Machine, error)

func (*Topology) Walk

func (t *Topology) Walk(fn func(*Directory) error) error

Jump to

Keyboard shortcuts

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