invalidator

package
v0.0.0-...-0c66be6 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 8 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartCacheInvalidator

func StartCacheInvalidator(ctx context.Context, kafkaConf kafka.Config, topics []string, mapper SignalMapper, broker *signal.Broker) error

func StartCacheInvalidatorAll

func StartCacheInvalidatorAll(ctx context.Context, kafkaConf kafka.Config, topics []string, broker *signal.Broker) error

func StartCacheInvalidatorDeviceType

func StartCacheInvalidatorDeviceType(ctx context.Context, kafkaConf kafka.Config, deviceTypeTopic string, broker *signal.Broker) error

StartCacheInvalidatorDeviceType is manly an example. most should use StartKnownCacheInvalidators or StartCacheInvalidatorAll

func StartKnownCacheInvalidators

func StartKnownCacheInvalidators(ctx context.Context, kafkaConf kafka.Config, knownTopics KnownTopics, broker *signal.Broker) error

Types

type Command

type Command struct {
	Command string `json:"command"`
	Id      string `json:"id"`
}

type KnownTopics

type KnownTopics struct {
	DeviceTopic         string
	DeviceTypeTopic     string
	ConceptTopic        string
	CharacteristicTopic string
	FunctionTopic       string
	AspectTopic         string
	HubTopic            string
	DeviceClassTopic    string
	DeviceGroupTopic    string
	ProtocolTopic       string
	LocationTopic       string
}

type SignalInfo

type SignalInfo struct {
	Signal      signal.Signal
	SignalValue string
}

type SignalMapper

type SignalMapper = func(message kafka.Message) []SignalInfo

func GetCommandSignalMapper

func GetCommandSignalMapper(sig signal.Signal) SignalMapper

func GetKnownSignalMapper

func GetKnownSignalMapper(topics KnownTopics) SignalMapper

Jump to

Keyboard shortcuts

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