basics

package
v0.3.15 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Basic

type Basic struct {
	// contains filtered or unexported fields
}

Basic is a base type to simplify your codes since you're using Peripheral type.

func (*Basic) AddPeripheral

func (s *Basic) AddPeripheral(peripherals ...Peripheral)

AddPeripheral adds a Peripheral object into Basic holder/host.

func (*Basic) Close

func (s *Basic) Close()

Close provides a closer to cleanup the peripheral gracefully

type Peripheral

type Peripheral interface {
	// Close provides a closer to cleanup the peripheral gracefully
	Close()
}

Peripheral represents a basic infrastructure which can be initialized and destroyed.

For a Peripheral, the host should add it into a list and destroy them while host is shutting down.

Jump to

Keyboard shortcuts

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