ibeacon

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrAlreadyDiscovering = bluetooth.Error("ibeacon discoverer is already running")
	WatchTimeout          = 180 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BluezDiscoverer

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

func NewDiscoverer

func NewDiscoverer(logger *logrus.Logger) (*BluezDiscoverer, error)

func (*BluezDiscoverer) Discover

func (d *BluezDiscoverer) Discover(ctx context.Context) (chan Event, error)

type Discoverer

type Discoverer interface {
	Discover(ctx context.Context) (chan Event, error)
}

type Event

type Event struct {
	UUID    string
	Type    EventType
	IBeacon IBeacon
}

type EventType

type EventType uint8
const (
	Online EventType = iota
	Offline
)

func (EventType) String

func (t EventType) String() string

type IBeacon

type IBeacon struct {
	ProximityUUID string
	Major         uint16
	Minor         uint16
	MeasuredPower uint16
}

Jump to

Keyboard shortcuts

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