identhandler

package
v0.0.0-...-b2cdabd Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterPlugin

func RegisterPlugin(plugin string, newFunc NewPlugin)

RegisterPlugin registers module plugin.

Types

type Handler

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

Handler identification handler.

func New

func New(cfg *config.Config) (handler *Handler, err error)

New returns pointer to new Handler.

func (*Handler) Close

func (handler *Handler) Close()

Close closes identification handler.

func (*Handler) GetSubjects

func (handler *Handler) GetSubjects() (subjects []string, err error)

GetSubjects returns current subjects.

func (*Handler) GetSystemID

func (handler *Handler) GetSystemID() (systemdID string, err error)

GetSystemID return system ID.

func (*Handler) GetUnitModel

func (handler *Handler) GetUnitModel() (unitModel string, err error)

GetUnitModel return unit model.

func (*Handler) SubjectsChangedChannel

func (handler *Handler) SubjectsChangedChannel() (channel <-chan []string)

SubjectsChangedChannel returns subjects changed channel.

type IdentModule

type IdentModule interface {
	GetSystemID() (systemdID string, err error)
	GetUnitModel() (unitModel string, err error)
	GetSubjects() (subjects []string, err error)
	SubjectsChangedChannel() (channel <-chan []string)
	Close() (err error)
}

IdentModule identification module interface.

type NewPlugin

type NewPlugin func(configJSON json.RawMessage) (module IdentModule, err error)

NewPlugin plugin new function.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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