pkg

package
v0.0.0-...-246d0bf Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TODO: CNIBinDir and CNIConfDir should maybe be globally configurable?
	// CNIBinDir describes the directory where the CNI binaries are stored
	CNIBinDir = "/opt/cni/bin"
	// CNIConfDir describes the directory where the CNI plugin's configuration is stored
	CNIConfDir = "/etc/cni/net.d"
	// netNSPathFmt gives the path to the a process network namespace, given the pid
	NetNSPathFmt = "/proc/%d/ns/net"
	// defaultCNIConfFilename is the vanity filename of default CNI configuration file
	DefaultCNIConfFilename = "10-openfaas.conflist"
	// defaultNetworkName names the "docker-bridge"-like CNI plugin-chain installed when no other CNI configuration is present.
	// This value appears in iptables comments created by CNI.
	DefaultNetworkName = "openfaas-cni-bridge"
	// defaultBridgeName is the default bridge device name used in the defaultCNIConf
	DefaultBridgeName = "openfaas0"
	// defaultSubnet is the default subnet used in the defaultCNIConf -- this value is set to not collide with common container networking subnets:
	DefaultSubnet = "10.62.0.0/16"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Mount

type Mount struct {
	Src  string
	Dest string
}

type Proxy

type Proxy struct {
	Timeout time.Duration
	Port    int
}

func NewProxy

func NewProxy(port int, timeout time.Duration) *Proxy

func (*Proxy) Start

func (p *Proxy) Start(gatewayChan chan string, done chan bool) error

type Service

type Service struct {
	Image  string
	Env    []string
	Name   string
	Mounts []Mount
	Caps   []string
	Args   []string
}

type Supervisor

type Supervisor struct {
	// contains filtered or unexported fields
}

func NewSupervisor

func NewSupervisor(sock string) (*Supervisor, error)

func (*Supervisor) Close

func (s *Supervisor) Close()

func (*Supervisor) Remove

func (s *Supervisor) Remove(svcs []Service) error

func (*Supervisor) Start

func (s *Supervisor) Start(svcs []Service) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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