Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitCache ¶
func InitCache( serviceName string, lc logger.LoggingClient, vdc coredata.ValueDescriptorClient, dc metadata.DeviceClient, pwc metadata.ProvisionWatcherClient)
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
Click to show internal directories.
Click to hide internal directories.