package cache

import "github.com/edgexfoundry/device-sdk-go/internal/cache"

Index

Functions

func InitCache

Init basic state for cache

Types

type DeviceCache

type DeviceCache interface {
	ForName(name string) (contract.Device, bool)
	ForId(id string) (contract.Device, bool)
	All() []contract.Device
	Add(device contract.Device) error
	Update(device contract.Device) error
	Remove(id string) error
	RemoveByName(name string) error
	UpdateAdminState(id string, state contract.AdminState) error
}

func Devices

func Devices() DeviceCache

type ProfileCache

type ProfileCache interface {
	ForName(name string) (contract.DeviceProfile, bool)
	ForId(id string) (contract.DeviceProfile, bool)
	All() []contract.DeviceProfile
	Add(profile contract.DeviceProfile) error
	Update(profile contract.DeviceProfile) error
	Remove(id string) error
	RemoveByName(name string) error
	DeviceResource(profileName string, resourceName string) (contract.DeviceResource, bool)
	CommandExists(profileName string, cmd string, method string) (bool, error)
	ResourceOperations(profileName string, cmd string, method string) ([]contract.ResourceOperation, error)
	ResourceOperation(profileName string, deviceResource string, method string) (contract.ResourceOperation, error)
}

func Profiles

func Profiles() ProfileCache

type ProvisionWatcherCache

type ProvisionWatcherCache interface {
	ForName(name string) (contract.ProvisionWatcher, bool)
	ForId(id string) (contract.ProvisionWatcher, bool)
	All() []contract.ProvisionWatcher
	Add(device contract.ProvisionWatcher) error
	Update(device contract.ProvisionWatcher) error
	Remove(id string) error
	RemoveByName(name string) error
	UpdateAdminState(id string, state contract.AdminState) error
}

func ProvisionWatchers

func ProvisionWatchers() ProvisionWatcherCache

type ValueDescriptorCache

type ValueDescriptorCache interface {
	ForName(name string) (contract.ValueDescriptor, bool)
	All() []contract.ValueDescriptor
	Add(descriptor contract.ValueDescriptor) error
	Update(descriptor contract.ValueDescriptor) error
	Remove(id string) error
	RemoveByName(name string) error
}

func ValueDescriptors

func ValueDescriptors() ValueDescriptorCache

Source Files

devices.go init.go profiles.go provisionwatchers.go valuedescriptors.go

Version
v1.4.0 (latest)
Published
Dec 21, 2020
Platform
linux/amd64
Imports
10 packages
Last checked
4 days ago

Tools for package owners.