Documentation
¶
Index ¶
- Constants
- Variables
- func ConnectivityCheck() error
- func GetArchSuffix(getClientArch ArchGetter) (suffix string, err error)
- func GetVersion() string
- func LoadComposeFile(wd string, file string) (*compose.Config, error)
- func LoadComposeFileWithArch(wd string, file string, archGetter ArchGetter) (*compose.Config, error)
- type ArchGetter
- type LocalResolver
- type Mount
- type Proxy
- type Resolver
- type Service
- type ServicePort
- type Supervisor
Constants ¶
const ( // DefaultFunctionNamespace is the default containerd namespace functions are created DefaultFunctionNamespace = "openfaas-fn" // NamespaceLabel indicates that a namespace is managed by faasd NamespaceLabel = "openfaas" // FaasdNamespace is the containerd namespace services are created FaasdNamespace = "openfaas" )
Variables ¶
var ( // GitCommit Git Commit SHA GitCommit string // Version version of the CLI Version string )
These values will be injected into these variables at the build time.
Functions ¶
func ConnectivityCheck ¶
func ConnectivityCheck() error
ConnectivityCheck checks if the controller can reach the public Internet via HTTPS. A license is required to use OpenFaaS CE for Commercial Use.
func GetArchSuffix ¶
func GetArchSuffix(getClientArch ArchGetter) (suffix string, err error)
GetArchSuffix provides client CPU architecture and client OS from ArchGetter
func LoadComposeFile ¶
LoadComposeFile is a helper method for loading a docker-compose file
func LoadComposeFileWithArch ¶
func LoadComposeFileWithArch(wd string, file string, archGetter ArchGetter) (*compose.Config, error)
LoadComposeFileWithArch is a helper method for loading a docker-compose file
Types ¶
type ArchGetter ¶
ArchGetter provides client CPU architecture and client OS
type LocalResolver ¶
LocalResolver provides hostname to IP look-up for faasd core services
func (*LocalResolver) Get ¶
func (l *LocalResolver) Get(upstream string, got chan<- string, timeout time.Duration)
Get resolves a hostname to an IP, or timesout after the duration has passed
func (*LocalResolver) Start ¶
func (l *LocalResolver) Start()
Start polling the disk for the hosts file in Path
type Proxy ¶
type Proxy struct {
Timeout time.Duration
// Port on which to listen to traffic
Port uint32
// Upstream is where to send traffic when received
Upstream string
// The IP to use to bind locally
HostIP string
Resolver Resolver
}
Proxy for exposing a private container
type Resolver ¶
type Resolver interface {
// Start any polling or connections required to resolve
Start()
// Get an IP address using an asynchronous operation
Get(upstream string, got chan<- string, timeout time.Duration)
}
Resolver resolves an upstream IP address for a given upstream host
func NewLocalResolver ¶
NewLocalResolver creates a new resolver for reading from a hosts file
type Service ¶
type Service struct {
// Image is the container image registry reference, in an OCI format.
Image string
Env []string
Name string
Mounts []Mount
Caps []string
Args []string
DependsOn []string
Ports []ServicePort
// User in the docker-compose.yaml spec can set as follows:
// a user-id, username, userid:groupid or user:group
User string
}
type ServicePort ¶
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