platform

package
v0.0.0-...-e2aaeb7 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2022 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Background

func Background()

Background starts the background processes for every process

func RegisterPlatform

func RegisterPlatform(name string, control Control)

RegisterPlatform is called whenever a new platform is instantiated

func ShutdownAllPlatforms

func ShutdownAllPlatforms()

ShutdownAllPlatforms is called at process stop to shutdown all platforms

func StartupAllPlatforms

func StartupAllPlatforms(c *config.Config)

StartupAllPlatforms is called at process start to initialize all platforms

Types

type Control

type Control interface {
	Startup(*config.Config) Control
	Background()
	Shutdown() Control
	AddAccessory(*accessory.TFAccessory)
	GetAccessory(string) (*accessory.TFAccessory, bool)
}

Control is the interface which all platforms must satisfy

func GetPlatform

func GetPlatform(name string) (Control, bool)

GetPlatform looks up a registered platform by name

Jump to

Keyboard shortcuts

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