backend

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetList

func GetList() []string

func HaveBackend

func HaveBackend(name string) bool

func Register

func Register(name string, b Backend)

Types

type Backend

type Backend interface {
	Configure(*zap.Logger, policies.PolicyRepo, map[string]string) error
	SetCommsClient(string, mqtt.Client, string)
	Version() (string, error)
	Start() error
	Stop() error

	GetCapabilities() (map[string]interface{}, error)
	GetState() (BackendState, string, error)

	ApplyPolicy(data policies.PolicyData) error
	RemovePolicy(data policies.PolicyData) error
}

func GetBackend

func GetBackend(name string) Backend

type BackendState

type BackendState int
const (
	Unknown BackendState = iota
	Running
	BackendError
	AgentError
)

func (BackendState) String

func (s BackendState) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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