tele

package
v0.210704.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2021 License: CC0-1.0 Imports: 22 Imported by: 0

Documentation

Overview

Server side of vender tele. Goals: - receive telemetry - receive state - send command - while hiding transport protocol (MQTT)

Index

Constants

View Source
const SecretsStale = 5 * time.Second

Variables

This section is empty.

Functions

func NewTele

func NewTele() tele_api.Teler

Types

type Secrets

type Secrets struct {
	sync.Mutex
	// contains filtered or unexported fields
}

username:password pairs, cached (stale) reading from file

func (*Secrets) CachedReadFile

func (s *Secrets) CachedReadFile(path string, refreshInterval time.Duration) error

func (*Secrets) UnsafeReadFile

func (s *Secrets) UnsafeReadFile(path string) error

Thread-unsafe. Use embedded Lock.

func (*Secrets) UnsafeReadFrom

func (s *Secrets) UnsafeReadFrom(r io.Reader) error

Thread-unsafe. Use embedded Lock.

func (*Secrets) UnsafeSet

func (s *Secrets) UnsafeSet(username, secret string) error

Thread-unsafe. Use embedded Lock.

func (*Secrets) UnsafeWriteTo

func (s *Secrets) UnsafeWriteTo(w io.Writer) error

func (*Secrets) Verify

func (s *Secrets) Verify(username, secret string) error

func (*Secrets) WriteFile

func (s *Secrets) WriteFile(filepath string) error

Directories

Path Synopsis
Separate package is workaround to import cycles.
Separate package is workaround to import cycles.

Jump to

Keyboard shortcuts

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