source

package
v0.0.0-...-886a5b3 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasAdapter

func HasAdapter(name string) bool

func SetAdapter

func SetAdapter(name string, connect Connect)

Types

type Adapter

type Adapter interface {
	Close() error
	Name() string
	ParseTag(tag *Tag) error
	ReadTags(tags map[string]Tag) error
	ReadTag(tag Tag) (string, error)
	WriteTag(tag Tag, value string) error
}

type Conn

type Conn struct {
	slots.UnimplementedControlServiceServer
	// contains filtered or unexported fields
}

func (*Conn) GetTagValue

func (c *Conn) GetTagValue(ctx context.Context, in *pb.Id) (*pb.TagValue, error)

func (*Conn) Logger

func (c *Conn) Logger() *zap.Logger

func (*Conn) SetTagValue

func (c *Conn) SetTagValue(ctx context.Context, in *pb.TagValue) (*pb.TagValue, error)

func (*Conn) Source

func (c *Conn) Source() *pb.Source

func (*Conn) SyncTagValue

func (c *Conn) SyncTagValue(id string, value string)

type Connect

type Connect = func(conn *Conn) (Adapter, error)

func GetAdapter

func GetAdapter(name string) (Connect, bool)

type SourceOption

type SourceOption interface {
	// contains filtered or unexported methods
}

func WithDebug

func WithDebug(debug bool) SourceOption

func WithReadDataInterval

func WithReadDataInterval(d time.Duration) SourceOption

func WithTickerInterval

func WithTickerInterval(d time.Duration) SourceOption

type SourceSlot

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

func Source

func Source(es *edge.EdgeService, opts ...SourceOption) (*SourceSlot, error)

func (*SourceSlot) Start

func (ts *SourceSlot) Start()

func (*SourceSlot) Stop

func (ts *SourceSlot) Stop()

type Tag

type Tag struct {
	Raw      *pb.Tag
	Metadata any
}

Jump to

Keyboard shortcuts

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