types

package
v0.0.0-...-ffed7d7 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AkashDeployments

type AkashDeployments struct {
	Name    string
	URL     string
	LeaseID string
	IP      string
}

func (*AkashDeployments) ParseDeploymentID

func (ad *AkashDeployments) ParseDeploymentID() (string, error)

func (*AkashDeployments) ParseProviderID

func (ad *AkashDeployments) ParseProviderID() (string, error)

type AkashStdout

type AkashStdout struct {
	Leases []struct {
		LeaseID  string `json:"lease_id"`
		Services []struct {
			Available string `json:"available"`
			Hosts     string `json:"hosts"`
			Name      string `json:"name"`
			Total     string `json:"total"`
		} `json:"services"`
	} `json:"leases"`
}

type Config

type Config struct {
	Port         int           `yaml:"port"`
	ReadTimeout  time.Duration `yaml:"readTimeout"`
	WriteTimeout time.Duration `yaml:"writeTimeout"`
}

Config to read from yaml/env

func (*Config) Validate

func (c *Config) Validate() error

necessary checks for the faas-akash configurations

type FaasAkashDeployments

type FaasAkashDeployments map[string]*AkashDeployments

type FaasError

type FaasError map[string]string

func (*FaasError) Error

func (f *FaasError) Error() string

type FunctionDeployment

type FunctionDeployment struct {
	// Service corresponds to a Service
	Service string `json:"service"`

	// Image corresponds to a Docker image
	Image string `json:"image"`

	// Network is specific to Docker Swarm - default overlay network is: func_functions
	Network string `json:"network"`

	// EnvProcess corresponds to the fprocess variable for your container watchdog.
	EnvProcess string `json:"envProcess"`

	// EnvVars provides overrides for functions.
	EnvVars map[string]string `json:"envVars"`

	// RegistryAuth is the registry authentication (optional)
	// in the same encoded format as Docker native credentials
	// (see ~/.docker/config.json)
	RegistryAuth string `json:"registryAuth,omitempty"`

	// Constraints are specific to back-end orchestration platform
	Constraints []string `json:"constraints"`

	// Secrets list of secrets to be made available to function
	Secrets []string `json:"secrets"`

	// Labels are metadata for functions which may be used by the
	// back-end for making scheduling or routing decisions
	Labels *map[string]string `json:"labels"`

	// Annotations are metadata for functions which may be used by the
	// back-end for management, orchestration, events and build tasks
	Annotations *map[string]string `json:"annotations"`

	// Limits for function
	Limits *types.FunctionResources `json:"limits"`

	// Requests of resources requested by function
	Requests *types.FunctionResources `json:"requests"`

	// ReadOnlyRootFilesystem removes write-access from the root filesystem
	// mount-point.
	ReadOnlyRootFilesystem bool `json:"readOnlyRootFilesystem"`

	// Namespace for the function to be deployed into
	Namespace string `json:"namespace,omitempty"`
}

type InvokeResolver

type InvokeResolver struct {
	ServiceMap ServiceMap
}

func (InvokeResolver) Resolve

func (ir InvokeResolver) Resolve(functionName string) (url.URL, error)

Resolver is responsible for locating the function, when we access the faas-url

type SDL

type SDL struct {
	Version    string        `yaml:"version"`
	Services   SDLService    `yaml:"services"`
	Profiles   SDLProfile    `yaml:"profiles"`
	Deployment SDLDeployment `yaml:"deployment"`
}

type SDLDeployment

type SDLDeployment struct {
	Web SDLDeploymentWeb `yaml:"web"`
}

type SDLDeploymentGlobal

type SDLDeploymentGlobal struct {
	Profile string `yaml:"profile"`
	Count   int    `yaml:"count"`
}

type SDLDeploymentWeb

type SDLDeploymentWeb struct {
	Global SDLDeploymentGlobal `yaml:"global"`
}

type SDLGlobalPlacement

type SDLGlobalPlacement struct {
	Pricing SDLPricing `yaml:"pricing"`
}

type SDLPricing

type SDLPricing struct {
	Web string `yaml:"web"`
}

type SDLProfile

type SDLProfile struct {
	Compute   SDLProfileCompute   `yaml:"compute"`
	Placement SDLProfilePlacement `yaml:"placement"`
}

type SDLProfileCompute

type SDLProfileCompute struct {
	Web SDLWebCompute `yaml:"web"`
}

type SDLProfilePlacement

type SDLProfilePlacement struct {
	Global SDLGlobalPlacement `yaml:"global"`
}

type SDLService

type SDLService struct {
	Web SDLWebService `yaml:"web"`
}

type SDLWebCompute

type SDLWebCompute struct {
	CPU    string `yaml:"cpu"`
	Memory string `yaml:"memory"`
	Disk   string `yaml:"disk"`
}

type SDLWebExpose

type SDLWebExpose struct {
	Port int                      `yaml:"port"`
	To   []map[string]interface{} `yaml:"to"`
}

type SDLWebService

type SDLWebService struct {
	Image  string         `yaml:"image"`
	Expose []SDLWebExpose `yaml:"expose"`
}

type ServiceMap

type ServiceMap map[string]*AkashDeployments

Jump to

Keyboard shortcuts

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