Documentation ¶
Index ¶
- Constants
- func CreateKey(targets ...string) string
- type Client
- func (c *Client) AddDevice(d model.Device) (model.Device, errors.EdgeX)
- func (c *Client) AddDeviceProfile(dp model.DeviceProfile) (model.DeviceProfile, errors.EdgeX)
- func (c *Client) AddDeviceService(ds model.DeviceService) (model.DeviceService, errors.EdgeX)
- func (c *Client) AddEvent(e model.Event) (model.Event, errors.EdgeX)
- func (c *Client) AddKeeperKeys(kv model.KVS, isFlatten bool) (keys []model.KeyOnly, edgeXerr errors.EdgeX)
- func (c *Client) AddNotification(notification model.Notification) (model.Notification, errors.EdgeX)
- func (c *Client) AddProvisionWatcher(pw model.ProvisionWatcher) (model.ProvisionWatcher, errors.EdgeX)
- func (c *Client) AddRegistration(r model.Registration) (model.Registration, errors.EdgeX)
- func (c *Client) AddSubscription(subscription model.Subscription) (model.Subscription, errors.EdgeX)
- func (c *Client) AddTransmission(t model.Transmission) (model.Transmission, errors.EdgeX)
- func (c *Client) AllDeviceProfiles(offset int, limit int, labels []string) ([]model.DeviceProfile, errors.EdgeX)
- func (c *Client) AllDeviceServices(offset int, limit int, labels []string) (deviceServices []model.DeviceService, edgeXerr errors.EdgeX)
- func (c *Client) AllDevices(offset int, limit int, labels []string) ([]model.Device, errors.EdgeX)
- func (c *Client) AllEvents(offset int, limit int) ([]model.Event, errors.EdgeX)
- func (c *Client) AllProvisionWatchers(offset int, limit int, labels []string) (provisionWatchers []model.ProvisionWatcher, edgexErr errors.EdgeX)
- func (c *Client) AllReadings(offset int, limit int) ([]model.Reading, errors.EdgeX)
- func (c *Client) AllSubscriptions(offset int, limit int) ([]model.Subscription, errors.EdgeX)
- func (c *Client) AllTransmissions(offset int, limit int) ([]model.Transmission, errors.EdgeX)
- func (c *Client) CleanupNotificationsByAge(age int64) (err errors.EdgeX)
- func (c *Client) DeleteDeviceById(id string) errors.EdgeX
- func (c *Client) DeleteDeviceByName(name string) errors.EdgeX
- func (c *Client) DeleteDeviceProfileById(id string) errors.EdgeX
- func (c *Client) DeleteDeviceProfileByName(name string) errors.EdgeX
- func (c *Client) DeleteDeviceServiceById(id string) errors.EdgeX
- func (c *Client) DeleteDeviceServiceByName(name string) errors.EdgeX
- func (c *Client) DeleteEventById(id string) (edgeXerr errors.EdgeX)
- func (c *Client) DeleteEventsByAge(age int64) (edgeXerr errors.EdgeX)
- func (c *Client) DeleteEventsByDeviceName(deviceName string) (edgeXerr errors.EdgeX)
- func (c *Client) DeleteKeeperKeys(key string, prefixMatch bool) (kvs []model.KeyOnly, edgeXerr errors.EdgeX)
- func (c *Client) DeleteNotificationById(id string) errors.EdgeX
- func (c *Client) DeleteProcessedNotificationsByAge(age int64) (err errors.EdgeX)
- func (c *Client) DeleteProcessedTransmissionsByAge(age int64) (err errors.EdgeX)
- func (c *Client) DeleteProvisionWatcherByName(name string) errors.EdgeX
- func (c *Client) DeleteRegistrationByServiceId(id string) errors.EdgeX
- func (c *Client) DeleteSubscriptionByName(name string) errors.EdgeX
- func (c *Client) DeviceById(id string) (device model.Device, edgeXerr errors.EdgeX)
- func (c *Client) DeviceByName(name string) (device model.Device, edgeXerr errors.EdgeX)
- func (c *Client) DeviceCountByLabels(labels []string) (uint32, errors.EdgeX)
- func (c *Client) DeviceCountByProfileName(profileName string) (uint32, errors.EdgeX)
- func (c *Client) DeviceCountByServiceName(serviceName string) (uint32, errors.EdgeX)
- func (c *Client) DeviceIdExists(id string) (bool, errors.EdgeX)
- func (c *Client) DeviceNameExists(name string) (bool, errors.EdgeX)
- func (c *Client) DeviceProfileById(id string) (deviceProfile model.DeviceProfile, err errors.EdgeX)
- func (c *Client) DeviceProfileByName(name string) (deviceProfile model.DeviceProfile, edgeXerr errors.EdgeX)
- func (c *Client) DeviceProfileCountByLabels(labels []string) (uint32, errors.EdgeX)
- func (c *Client) DeviceProfileCountByManufacturer(manufacturer string) (uint32, errors.EdgeX)
- func (c *Client) DeviceProfileCountByManufacturerAndModel(manufacturer, model string) (uint32, errors.EdgeX)
- func (c *Client) DeviceProfileCountByModel(model string) (uint32, errors.EdgeX)
- func (c *Client) DeviceProfileNameExists(name string) (bool, errors.EdgeX)
- func (c *Client) DeviceProfilesByManufacturer(offset int, limit int, manufacturer string) ([]model.DeviceProfile, errors.EdgeX)
- func (c *Client) DeviceProfilesByManufacturerAndModel(offset int, limit int, manufacturer string, model string) ([]model.DeviceProfile, errors.EdgeX)
- func (c *Client) DeviceProfilesByModel(offset int, limit int, model string) ([]model.DeviceProfile, errors.EdgeX)
- func (c *Client) DeviceServiceById(id string) (deviceService model.DeviceService, edgeXerr errors.EdgeX)
- func (c *Client) DeviceServiceByName(name string) (deviceService model.DeviceService, edgeXerr errors.EdgeX)
- func (c *Client) DeviceServiceCountByLabels(labels []string) (uint32, errors.EdgeX)
- func (c *Client) DeviceServiceNameExists(name string) (bool, errors.EdgeX)
- func (c *Client) DevicesByProfileName(offset int, limit int, profileName string) (devices []model.Device, edgeXerr errors.EdgeX)
- func (c *Client) DevicesByServiceName(offset int, limit int, name string) (devices []model.Device, edgeXerr errors.EdgeX)
- func (c *Client) EventById(id string) (event model.Event, edgeXerr errors.EdgeX)
- func (c *Client) EventCountByDeviceName(deviceName string) (uint32, errors.EdgeX)
- func (c *Client) EventCountByTimeRange(startTime int64, endTime int64) (uint32, errors.EdgeX)
- func (c *Client) EventTotalCount() (uint32, errors.EdgeX)
- func (c *Client) EventsByDeviceName(offset int, limit int, name string) (events []model.Event, edgeXerr errors.EdgeX)
- func (c *Client) EventsByTimeRange(startTime int64, endTime int64, offset int, limit int) (events []model.Event, edgeXerr errors.EdgeX)
- func (c *Client) KeeperKeys(key string, keyOnly bool, isRaw bool) (kvs []model.KVResponse, edgeXerr errors.EdgeX)
- func (c *Client) LatestNotificationByOffset(offset uint32) (model.Notification, errors.EdgeX)
- func (c *Client) LatestReadingByOffset(offset uint32) (model.Reading, errors.EdgeX)
- func (c *Client) NotificationById(id string) (notification model.Notification, edgexErr errors.EdgeX)
- func (c *Client) NotificationCountByCategoriesAndLabels(categories []string, labels []string) (uint32, errors.EdgeX)
- func (c *Client) NotificationCountByCategory(category string) (uint32, errors.EdgeX)
- func (c *Client) NotificationCountByLabel(label string) (uint32, errors.EdgeX)
- func (c *Client) NotificationCountByStatus(status string) (uint32, errors.EdgeX)
- func (c *Client) NotificationCountByTimeRange(start int64, end int64) (uint32, errors.EdgeX)
- func (c *Client) NotificationTotalCount() (uint32, errors.EdgeX)
- func (c *Client) NotificationsByCategoriesAndLabels(offset int, limit int, categories []string, labels []string) (notifications []model.Notification, edgeXerr errors.EdgeX)
- func (c *Client) NotificationsByCategory(offset int, limit int, category string) (notifications []model.Notification, edgeXerr errors.EdgeX)
- func (c *Client) NotificationsByLabel(offset int, limit int, label string) (notifications []model.Notification, edgeXerr errors.EdgeX)
- func (c *Client) NotificationsByStatus(offset int, limit int, status string) (notifications []model.Notification, edgeXerr errors.EdgeX)
- func (c *Client) NotificationsByTimeRange(start int64, end int64, offset int, limit int) (notifications []model.Notification, edgeXerr errors.EdgeX)
- func (c *Client) ProvisionWatcherById(id string) (provisionWatcher model.ProvisionWatcher, edgexErr errors.EdgeX)
- func (c *Client) ProvisionWatcherByName(name string) (provisionWatcher model.ProvisionWatcher, edgexErr errors.EdgeX)
- func (c *Client) ProvisionWatcherCountByLabels(labels []string) (uint32, errors.EdgeX)
- func (c *Client) ProvisionWatcherCountByProfileName(name string) (uint32, errors.EdgeX)
- func (c *Client) ProvisionWatcherCountByServiceName(name string) (uint32, errors.EdgeX)
- func (c *Client) ProvisionWatchersByProfileName(offset int, limit int, name string) (provisionWatchers []model.ProvisionWatcher, edgexErr errors.EdgeX)
- func (c *Client) ProvisionWatchersByServiceName(offset int, limit int, name string) (provisionWatchers []model.ProvisionWatcher, edgexErr errors.EdgeX)
- func (c *Client) ReadingCountByDeviceName(deviceName string) (uint32, errors.EdgeX)
- func (c *Client) ReadingCountByDeviceNameAndResourceName(deviceName string, resourceName string) (uint32, errors.EdgeX)
- func (c *Client) ReadingCountByDeviceNameAndResourceNameAndTimeRange(deviceName string, resourceName string, start int64, end int64) (uint32, errors.EdgeX)
- func (c *Client) ReadingCountByDeviceNameAndResourceNamesAndTimeRange(deviceName string, resourceNames []string, start int64, end int64) (uint32, errors.EdgeX)
- func (c *Client) ReadingCountByDeviceNameAndTimeRange(deviceName string, start int64, end int64) (uint32, errors.EdgeX)
- func (c *Client) ReadingCountByResourceName(resourceName string) (uint32, errors.EdgeX)
- func (c *Client) ReadingCountByResourceNameAndTimeRange(resourceName string, startTime int64, endTime int64) (uint32, errors.EdgeX)
- func (c *Client) ReadingCountByTimeRange(start int64, end int64) (uint32, errors.EdgeX)
- func (c *Client) ReadingTotalCount() (uint32, errors.EdgeX)
- func (c *Client) ReadingsByDeviceName(offset int, limit int, name string) (readings []model.Reading, edgeXerr errors.EdgeX)
- func (c *Client) ReadingsByDeviceNameAndResourceName(deviceName string, resourceName string, offset int, limit int) (readings []model.Reading, err errors.EdgeX)
- func (c *Client) ReadingsByDeviceNameAndResourceNameAndTimeRange(deviceName string, resourceName string, start int64, end int64, offset int, ...) (readings []model.Reading, err errors.EdgeX)
- func (c *Client) ReadingsByDeviceNameAndResourceNamesAndTimeRange(deviceName string, resourceNames []string, start, end int64, offset, limit int) (readings []model.Reading, err errors.EdgeX)
- func (c *Client) ReadingsByDeviceNameAndTimeRange(deviceName string, start int64, end int64, offset int, limit int) (readings []model.Reading, err errors.EdgeX)
- func (c *Client) ReadingsByResourceName(offset int, limit int, resourceName string) (readings []model.Reading, edgeXerr errors.EdgeX)
- func (c *Client) ReadingsByResourceNameAndTimeRange(resourceName string, start int64, end int64, offset int, limit int) (readings []model.Reading, err errors.EdgeX)
- func (c *Client) ReadingsByTimeRange(start int64, end int64, offset int, limit int) (readings []model.Reading, edgeXerr errors.EdgeX)
- func (c *Client) RegistrationByServiceId(id string) (model.Registration, errors.EdgeX)
- func (c *Client) Registrations() ([]model.Registration, errors.EdgeX)
- func (c *Client) SubscriptionById(id string) (subscription model.Subscription, edgexErr errors.EdgeX)
- func (c *Client) SubscriptionByName(name string) (subscription model.Subscription, edgeXerr errors.EdgeX)
- func (c *Client) SubscriptionCountByCategory(category string) (uint32, errors.EdgeX)
- func (c *Client) SubscriptionCountByLabel(label string) (uint32, errors.EdgeX)
- func (c *Client) SubscriptionCountByReceiver(receiver string) (uint32, errors.EdgeX)
- func (c *Client) SubscriptionTotalCount() (uint32, errors.EdgeX)
- func (c *Client) SubscriptionsByCategoriesAndLabels(offset int, limit int, categories []string, labels []string) (subscriptions []model.Subscription, edgeXerr errors.EdgeX)
- func (c *Client) SubscriptionsByCategory(offset int, limit int, category string) (subscriptions []model.Subscription, edgeXerr errors.EdgeX)
- func (c *Client) SubscriptionsByLabel(offset int, limit int, label string) (subscriptions []model.Subscription, edgeXerr errors.EdgeX)
- func (c *Client) SubscriptionsByReceiver(offset int, limit int, receiver string) (subscriptions []model.Subscription, edgeXerr errors.EdgeX)
- func (c *Client) TransmissionById(id string) (trans model.Transmission, edgexErr errors.EdgeX)
- func (c *Client) TransmissionCountByNotificationId(id string) (uint32, errors.EdgeX)
- func (c *Client) TransmissionCountByStatus(status string) (uint32, errors.EdgeX)
- func (c *Client) TransmissionCountBySubscriptionName(subscriptionName string) (uint32, errors.EdgeX)
- func (c *Client) TransmissionCountByTimeRange(start int64, end int64) (uint32, errors.EdgeX)
- func (c *Client) TransmissionTotalCount() (uint32, errors.EdgeX)
- func (c *Client) TransmissionsByNotificationId(offset int, limit int, id string) (transmissions []model.Transmission, err errors.EdgeX)
- func (c *Client) TransmissionsByStatus(offset int, limit int, status string) (transmissions []model.Transmission, err errors.EdgeX)
- func (c *Client) TransmissionsBySubscriptionName(offset int, limit int, subscriptionName string) (transmissions []model.Transmission, err errors.EdgeX)
- func (c *Client) TransmissionsByTimeRange(start int64, end int64, offset int, limit int) (transmissions []model.Transmission, err errors.EdgeX)
- func (c *Client) UpdateDevice(d model.Device) errors.EdgeX
- func (c *Client) UpdateDeviceProfile(dp model.DeviceProfile) errors.EdgeX
- func (c *Client) UpdateDeviceService(ds model.DeviceService) errors.EdgeX
- func (c *Client) UpdateNotification(n model.Notification) errors.EdgeX
- func (c *Client) UpdateProvisionWatcher(pw model.ProvisionWatcher) errors.EdgeX
- func (c *Client) UpdateRegistration(r model.Registration) errors.EdgeX
- func (c *Client) UpdateSubscription(subscription model.Subscription) errors.EdgeX
- func (c *Client) UpdateTransmission(trans model.Transmission) errors.EdgeX
Constants ¶
const ( MULTI = "MULTI" SET = "SET" GET = "GET" EXISTS = "EXISTS" DEL = "DEL" HGETALL = "HGETALL" HLEN = "HLEN" HSET = "HSET" HSETNX = "HSETNX" HGET = "HGET" HEXISTS = "HEXISTS" HDEL = "HDEL" SADD = "SADD" SREM = "SREM" ZADD = "ZADD" ZREM = "ZREM" EXEC = "EXEC" ZRANGE = "ZRANGE" ZREVRANGE = "ZREVRANGE" MGET = "MGET" ZCARD = "ZCARD" ZCOUNT = "ZCOUNT" UNLINK = "UNLINK" ZRANGEBYSCORE = "ZRANGEBYSCORE" ZREVRANGEBYSCORE = "ZREVRANGEBYSCORE" LIMIT = "LIMIT" ZUNIONSTORE = "ZUNIONSTORE" ZINTERSTORE = "ZINTERSTORE" TYPE = "TYPE" )
Redis commmands used in this project Reference: https://redis.io/commands
const ( InfiniteMin = "-inf" InfiniteMax = "+inf" GreaterThanZero = "(0" DBKeySeparator = ":" )
const ( Hash = "hash" String = "string" None = "none" )
Redis data types
const ( DeviceCollection = "md|dv" DeviceCollectionName = DeviceCollection + DBKeySeparator + common.Name DeviceCollectionLabel = DeviceCollection + DBKeySeparator + common.Label DeviceCollectionServiceName = DeviceCollection + DBKeySeparator + common.Service + DBKeySeparator + common.Name DeviceCollectionProfileName = DeviceCollection + DBKeySeparator + common.Profile + DBKeySeparator + common.Name )
const ( DeviceProfileCollection = "md|dp" DeviceProfileCollectionName = DeviceProfileCollection + DBKeySeparator + common.Name DeviceProfileCollectionLabel = DeviceProfileCollection + DBKeySeparator + common.Label DeviceProfileCollectionModel = DeviceProfileCollection + DBKeySeparator + common.Model DeviceProfileCollectionManufacturer = DeviceProfileCollection + DBKeySeparator + common.Manufacturer )
const ( DeviceServiceCollection = "md|ds" DeviceServiceCollectionName = DeviceServiceCollection + DBKeySeparator + common.Name DeviceServiceCollectionLabel = DeviceServiceCollection + DBKeySeparator + common.Label )
const ( EventsCollection = "cd|evt" EventsCollectionOrigin = EventsCollection + DBKeySeparator + common.Origin EventsCollectionDeviceName = EventsCollection + DBKeySeparator + common.Device + DBKeySeparator + common.Name EventsCollectionReadings = EventsCollection + DBKeySeparator + "readings" )
const ( NotificationCollection = "sn|notif" NotificationCollectionCategory = NotificationCollection + DBKeySeparator + common.Category NotificationCollectionLabel = NotificationCollection + DBKeySeparator + common.Label NotificationCollectionSender = NotificationCollection + DBKeySeparator + common.Sender NotificationCollectionSeverity = NotificationCollection + DBKeySeparator + common.Severity NotificationCollectionStatus = NotificationCollection + DBKeySeparator + common.Status NotificationCollectionCreated = NotificationCollection + DBKeySeparator + common.Created )
const ( ProvisionWatcherCollection = "md|pw" ProvisionWatcherCollectionName = ProvisionWatcherCollection + DBKeySeparator + common.Name ProvisionWatcherCollectionLabel = ProvisionWatcherCollection + DBKeySeparator + common.Label ProvisionWatcherCollectionServiceName = ProvisionWatcherCollectionName + DBKeySeparator + common.Service + DBKeySeparator + common.Name ProvisionWatcherCollectionProfileName = ProvisionWatcherCollectionName + DBKeySeparator + common.Profile + DBKeySeparator + common.Name )
const ( ReadingsCollection = "cd|rd" ReadingsCollectionOrigin = ReadingsCollection + DBKeySeparator + common.Origin ReadingsCollectionDeviceName = ReadingsCollection + DBKeySeparator + common.DeviceName ReadingsCollectionResourceName = ReadingsCollection + DBKeySeparator + common.ResourceName ReadingsCollectionDeviceNameResourceName = ReadingsCollection + DBKeySeparator + common.DeviceName + DBKeySeparator + common.ResourceName )
const ( SubscriptionCollection = "sn|sub" SubscriptionCollectionName = SubscriptionCollection + DBKeySeparator + common.Name SubscriptionCollectionCategory = SubscriptionCollection + DBKeySeparator + common.Category SubscriptionCollectionLabel = SubscriptionCollection + DBKeySeparator + common.Label SubscriptionCollectionReceiver = SubscriptionCollection + DBKeySeparator + common.Receiver )
const ( TransmissionCollection = "sn|trans" TransmissionCollectionStatus = TransmissionCollection + DBKeySeparator + common.Status TransmissionCollectionSubscriptionName = TransmissionCollection + DBKeySeparator + common.Subscription + DBKeySeparator + common.Name TransmissionCollectionNotificationId = TransmissionCollection + DBKeySeparator + common.Notification + DBKeySeparator + common.Id TransmissionCollectionCreated = TransmissionCollection + DBKeySeparator + common.Created )
const KVCollection = "kp|kv"
const RegistrationCollection = "kp|r"
const RegistrationCollectionName = RegistrationCollection + DBKeySeparator + common.Name
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct { *redisClient.Client // contains filtered or unexported fields }
func NewClient ¶
func NewClient(config db.Configuration, logger logger.LoggingClient) (*Client, errors.EdgeX)
func (*Client) AddDeviceProfile ¶
func (c *Client) AddDeviceProfile(dp model.DeviceProfile) (model.DeviceProfile, errors.EdgeX)
Add a new device profle
func (*Client) AddDeviceService ¶
func (c *Client) AddDeviceService(ds model.DeviceService) (model.DeviceService, errors.EdgeX)
AddDeviceService adds a new device service
func (*Client) AddKeeperKeys ¶
func (c *Client) AddKeeperKeys(kv model.KVS, isFlatten bool) (keys []model.KeyOnly, edgeXerr errors.EdgeX)
AddKeeperKeys returns the values stored for the specified key or with the same key prefix
func (*Client) AddNotification ¶
func (c *Client) AddNotification(notification model.Notification) (model.Notification, errors.EdgeX)
AddNotification adds a new notification
func (*Client) AddProvisionWatcher ¶
func (c *Client) AddProvisionWatcher(pw model.ProvisionWatcher) (model.ProvisionWatcher, errors.EdgeX)
AddProvisionWatcher adds a new provision watcher
func (*Client) AddRegistration ¶
func (c *Client) AddRegistration(r model.Registration) (model.Registration, errors.EdgeX)
func (*Client) AddSubscription ¶
func (c *Client) AddSubscription(subscription model.Subscription) (model.Subscription, errors.EdgeX)
AddSubscription adds a new subscription
func (*Client) AddTransmission ¶
func (c *Client) AddTransmission(t model.Transmission) (model.Transmission, errors.EdgeX)
AddTransmission adds a new transmission
func (*Client) AllDeviceProfiles ¶
func (c *Client) AllDeviceProfiles(offset int, limit int, labels []string) ([]model.DeviceProfile, errors.EdgeX)
AllDeviceProfiles query device profiles with offset and limit
func (*Client) AllDeviceServices ¶
func (c *Client) AllDeviceServices(offset int, limit int, labels []string) (deviceServices []model.DeviceService, edgeXerr errors.EdgeX)
AllDeviceServices returns multiple device services per query criteria, including offset: the number of items to skip before starting to collect the result set limit: The numbers of items to return labels: allows for querying a given object by associated user-defined labels
func (*Client) AllDevices ¶
AllDevices query the devices with offset, limit, and labels
func (*Client) AllProvisionWatchers ¶
func (c *Client) AllProvisionWatchers(offset int, limit int, labels []string) (provisionWatchers []model.ProvisionWatcher, edgexErr errors.EdgeX)
AllProvisionWatchers query provision watchers with offset, limit and labels
func (*Client) AllReadings ¶
AllReadings query events by offset, limit, and labels
func (*Client) AllSubscriptions ¶
AllSubscriptions returns multiple subscriptions per query criteria, including offset: The number of items to skip before starting to collect the result set. limit: The maximum number of items to return.
func (*Client) AllTransmissions ¶
AllTransmissions returns multiple transmissions per query criteria, including offset: The number of items to skip before starting to collect the result set. limit: The maximum number of items to return.
func (*Client) CleanupNotificationsByAge ¶
CleanupNotificationsByAge deletes notifications and their corresponding transmissions that are older than age. This function is implemented to starts up two goroutines to delete transmissions and notifications in the background to achieve better performance.
func (*Client) DeleteDeviceById ¶
DeleteDeviceById deletes a device by id
func (*Client) DeleteDeviceByName ¶
DeleteDeviceByName deletes a device by name
func (*Client) DeleteDeviceProfileById ¶
DeleteDeviceProfileById deletes a device profile by id
func (*Client) DeleteDeviceProfileByName ¶
DeleteDeviceProfileByName deletes a device profile by name
func (*Client) DeleteDeviceServiceById ¶
DeleteDeviceServiceById deletes a device service by id
func (*Client) DeleteDeviceServiceByName ¶
DeleteDeviceServiceByName deletes a device service by name
func (*Client) DeleteEventById ¶
DeleteEventById removes an event by id
func (*Client) DeleteEventsByAge ¶
DeleteEventsByAge deletes events and their corresponding readings that are older than age. This function is implemented to starts up two goroutines to delete readings and events in the background to achieve better performance.
func (*Client) DeleteEventsByDeviceName ¶
DeleteEventsByDeviceName deletes specific device's events and corresponding readings. This function is implemented to starts up two goroutines to delete readings and events in the background to achieve better performance.
func (*Client) DeleteKeeperKeys ¶
func (c *Client) DeleteKeeperKeys(key string, prefixMatch bool) (kvs []model.KeyOnly, edgeXerr errors.EdgeX)
DeleteKeeperKeys delete the specified key or keys with the same prefix
func (*Client) DeleteNotificationById ¶
DeleteNotificationById deletes a notification by id
func (*Client) DeleteProcessedNotificationsByAge ¶
DeleteProcessedNotificationsByAge deletes processed notifications and their corresponding transmissions that are older than age. This function is implemented to starts up two goroutines to delete transmissions and notifications in the background to achieve better performance.
func (*Client) DeleteProcessedTransmissionsByAge ¶
DeleteProcessedTransmissionsByAge deletes the processed transmissions((ACKNOWLEDGED, SENT, ESCALATED) that are older than age. This function is implemented to starts up goroutines to delete processed transmissions in the background to achieve better performance.
func (*Client) DeleteProvisionWatcherByName ¶
DeleteProvisionWatcherByName deletes a provision watcher by name
func (*Client) DeleteRegistrationByServiceId ¶
func (*Client) DeleteSubscriptionByName ¶
DeleteSubscriptionByName deletes a subscription by name
func (*Client) DeviceById ¶
DeviceById gets a device by id
func (*Client) DeviceByName ¶
DeviceByName gets a device by name
func (*Client) DeviceCountByLabels ¶
DeviceCountByLabels returns the total count of Devices with labels specified. If no label is specified, the total count of all devices will be returned.
func (*Client) DeviceCountByProfileName ¶
DeviceCountByProfileName returns the count of Devices associated with specified profile
func (*Client) DeviceCountByServiceName ¶
DeviceCountByServiceName returns the count of Devices associated with specified service
func (*Client) DeviceIdExists ¶
DeviceIdExists checks the device existence by id
func (*Client) DeviceNameExists ¶
DeviceNameExists checks the device existence by name
func (*Client) DeviceProfileById ¶
DeviceProfileById gets a device profile by id
func (*Client) DeviceProfileByName ¶
func (c *Client) DeviceProfileByName(name string) (deviceProfile model.DeviceProfile, edgeXerr errors.EdgeX)
DeviceProfileByName gets a device profile by name
func (*Client) DeviceProfileCountByLabels ¶
DeviceProfileCountByLabels returns the total count of Device Profiles with labels specified. If no label is specified, the total count of all device profiles will be returned.
func (*Client) DeviceProfileCountByManufacturer ¶
DeviceProfileCountByManufacturer returns the count of Device Profiles associated with specified manufacturer
func (*Client) DeviceProfileCountByManufacturerAndModel ¶
func (c *Client) DeviceProfileCountByManufacturerAndModel(manufacturer, model string) (uint32, errors.EdgeX)
DeviceProfileCountByManufacturerAndModel returns the count of Device Profiles associated with specified manufacturer and model
func (*Client) DeviceProfileCountByModel ¶
DeviceProfileCountByModel returns the count of Device Profiles associated with specified model
func (*Client) DeviceProfileNameExists ¶
DeviceProfileNameExists checks the device profile exists by name
func (*Client) DeviceProfilesByManufacturer ¶
func (c *Client) DeviceProfilesByManufacturer(offset int, limit int, manufacturer string) ([]model.DeviceProfile, errors.EdgeX)
DeviceProfilesByManufacturer query device profiles with offset, limit and manufacturer
func (*Client) DeviceProfilesByManufacturerAndModel ¶
func (c *Client) DeviceProfilesByManufacturerAndModel(offset int, limit int, manufacturer string, model string) ([]model.DeviceProfile, errors.EdgeX)
DeviceProfilesByManufacturerAndModel query device profiles with offset, limit, manufacturer and model
func (*Client) DeviceProfilesByModel ¶
func (c *Client) DeviceProfilesByModel(offset int, limit int, model string) ([]model.DeviceProfile, errors.EdgeX)
DeviceProfilesByModel query device profiles with offset, limit and model
func (*Client) DeviceServiceById ¶
func (c *Client) DeviceServiceById(id string) (deviceService model.DeviceService, edgeXerr errors.EdgeX)
DeviceServiceById gets a device service by id
func (*Client) DeviceServiceByName ¶
func (c *Client) DeviceServiceByName(name string) (deviceService model.DeviceService, edgeXerr errors.EdgeX)
DeviceServiceByName gets a device service by name
func (*Client) DeviceServiceCountByLabels ¶
DeviceServiceCountByLabels returns the total count of Device Services with labels specified. If no label is specified, the total count of all device services will be returned.
func (*Client) DeviceServiceNameExists ¶
DeviceServiceNameExists checks the device service exists by name
func (*Client) DevicesByProfileName ¶
func (c *Client) DevicesByProfileName(offset int, limit int, profileName string) (devices []model.Device, edgeXerr errors.EdgeX)
DevicesByProfileName query devices by offset, limit and profile name
func (*Client) DevicesByServiceName ¶
func (c *Client) DevicesByServiceName(offset int, limit int, name string) (devices []model.Device, edgeXerr errors.EdgeX)
DevicesByServiceName query devices by offset, limit and name
func (*Client) EventCountByDeviceName ¶
EventCountByDeviceName returns the count of Event associated a specific Device from the database
func (*Client) EventCountByTimeRange ¶
EventCountByTimeRange returns the count of Event by time range
func (*Client) EventTotalCount ¶
EventTotalCount returns the total count of Event from the database
func (*Client) EventsByDeviceName ¶
func (c *Client) EventsByDeviceName(offset int, limit int, name string) (events []model.Event, edgeXerr errors.EdgeX)
EventsByDeviceName query events by offset, limit and device name
func (*Client) EventsByTimeRange ¶
func (c *Client) EventsByTimeRange(startTime int64, endTime int64, offset int, limit int) (events []model.Event, edgeXerr errors.EdgeX)
EventsByTimeRange query events by time range, offset, and limit
func (*Client) KeeperKeys ¶
func (c *Client) KeeperKeys(key string, keyOnly bool, isRaw bool) (kvs []model.KVResponse, edgeXerr errors.EdgeX)
KeeperKeys returns the values stored for the specified key or with the same key prefix
func (*Client) LatestNotificationByOffset ¶
LatestNotificationByOffset returns a latest notification by offset
func (*Client) LatestReadingByOffset ¶
LatestReadingByOffset returns a latest reading by offset
func (*Client) NotificationById ¶
func (c *Client) NotificationById(id string) (notification model.Notification, edgexErr errors.EdgeX)
NotificationById gets a notification by id
func (*Client) NotificationCountByCategoriesAndLabels ¶
func (c *Client) NotificationCountByCategoriesAndLabels(categories []string, labels []string) (uint32, errors.EdgeX)
NotificationCountByCategoriesAndLabels returns the count of Notification associated with specified categories and labels from the database
func (*Client) NotificationCountByCategory ¶
NotificationCountByCategory returns the count of Notification associated with specified category from the database
func (*Client) NotificationCountByLabel ¶
NotificationCountByLabel returns the count of Notification associated with specified label from the database
func (*Client) NotificationCountByStatus ¶
NotificationCountByStatus returns the count of Notification associated with specified status from the database
func (*Client) NotificationCountByTimeRange ¶
NotificationCountByTimeRange returns the count of Notification from the database within specified time range
func (*Client) NotificationTotalCount ¶
NotificationTotalCount returns the total count of Notification from the database
func (*Client) NotificationsByCategoriesAndLabels ¶
func (c *Client) NotificationsByCategoriesAndLabels(offset int, limit int, categories []string, labels []string) (notifications []model.Notification, edgeXerr errors.EdgeX)
NotificationsByCategoriesAndLabels queries notifications by offset, limit, categories and labels
func (*Client) NotificationsByCategory ¶
func (c *Client) NotificationsByCategory(offset int, limit int, category string) (notifications []model.Notification, edgeXerr errors.EdgeX)
NotificationsByCategory queries notifications by offset, limit and category
func (*Client) NotificationsByLabel ¶
func (c *Client) NotificationsByLabel(offset int, limit int, label string) (notifications []model.Notification, edgeXerr errors.EdgeX)
NotificationsByLabel queries notifications by offset, limit and label
func (*Client) NotificationsByStatus ¶
func (c *Client) NotificationsByStatus(offset int, limit int, status string) (notifications []model.Notification, edgeXerr errors.EdgeX)
NotificationsByStatus queries notifications by offset, limit and status
func (*Client) NotificationsByTimeRange ¶
func (c *Client) NotificationsByTimeRange(start int64, end int64, offset int, limit int) (notifications []model.Notification, edgeXerr errors.EdgeX)
NotificationsByTimeRange query notifications by time range, offset, and limit
func (*Client) ProvisionWatcherById ¶
func (c *Client) ProvisionWatcherById(id string) (provisionWatcher model.ProvisionWatcher, edgexErr errors.EdgeX)
ProvisionWatcherById gets a provision watcher by id
func (*Client) ProvisionWatcherByName ¶
func (c *Client) ProvisionWatcherByName(name string) (provisionWatcher model.ProvisionWatcher, edgexErr errors.EdgeX)
ProvisionWatcherByName gets a provision watcher by name
func (*Client) ProvisionWatcherCountByLabels ¶
ProvisionWatcherCountByLabels returns the total count of Provision Watchers with labels specified. If no label is specified, the total count of all provision watchers will be returned.
func (*Client) ProvisionWatcherCountByProfileName ¶
ProvisionWatcherCountByProfileName returns the count of Provision Watcher associated with specified profile
func (*Client) ProvisionWatcherCountByServiceName ¶
ProvisionWatcherCountByServiceName returns the count of Provision Watcher associated with specified service
func (*Client) ProvisionWatchersByProfileName ¶
func (c *Client) ProvisionWatchersByProfileName(offset int, limit int, name string) (provisionWatchers []model.ProvisionWatcher, edgexErr errors.EdgeX)
ProvisionWatchersByProfileName query provision watchers by offset, limit and profile name
func (*Client) ProvisionWatchersByServiceName ¶
func (c *Client) ProvisionWatchersByServiceName(offset int, limit int, name string) (provisionWatchers []model.ProvisionWatcher, edgexErr errors.EdgeX)
ProvisionWatchersByServiceName query provision watchers by offset, limit and service name
func (*Client) ReadingCountByDeviceName ¶
ReadingCountByDeviceName returns the count of Readings associated a specific Device from the database
func (*Client) ReadingCountByDeviceNameAndResourceName ¶
func (c *Client) ReadingCountByDeviceNameAndResourceName(deviceName string, resourceName string) (uint32, errors.EdgeX)
ReadingCountByDeviceNameAndResourceName returns the count of Readings associated with specified Resource and Device from the database
func (*Client) ReadingCountByDeviceNameAndResourceNameAndTimeRange ¶
func (c *Client) ReadingCountByDeviceNameAndResourceNameAndTimeRange(deviceName string, resourceName string, start int64, end int64) (uint32, errors.EdgeX)
ReadingCountByDeviceNameAndResourceNameAndTimeRange returns the count of Readings associated with specified Resource and Device from the database within specified time range
func (*Client) ReadingCountByDeviceNameAndResourceNamesAndTimeRange ¶
func (c *Client) ReadingCountByDeviceNameAndResourceNamesAndTimeRange(deviceName string, resourceNames []string, start int64, end int64) (uint32, errors.EdgeX)
ReadingCountByDeviceNameAndResourceNamesAndTimeRange returns the count of readings by origin within the time range associated with the specified device and resourceName slice from db
func (*Client) ReadingCountByDeviceNameAndTimeRange ¶
func (*Client) ReadingCountByResourceName ¶
ReadingCountByResourceName returns the count of Readings associated a specific Resource from the database
func (*Client) ReadingCountByResourceNameAndTimeRange ¶
func (c *Client) ReadingCountByResourceNameAndTimeRange(resourceName string, startTime int64, endTime int64) (uint32, errors.EdgeX)
ReadingCountByResourceNameAndTimeRange returns the count of Readings associated a specific Resource from the database within specified time range
func (*Client) ReadingCountByTimeRange ¶
ReadingCountByTimeRange returns the count of Readings from the database within specified time range
func (*Client) ReadingTotalCount ¶
ReadingTotalCount returns the total count of Event from the database
func (*Client) ReadingsByDeviceName ¶
func (c *Client) ReadingsByDeviceName(offset int, limit int, name string) (readings []model.Reading, edgeXerr errors.EdgeX)
ReadingsByDeviceName query readings by offset, limit and device name
func (*Client) ReadingsByDeviceNameAndResourceName ¶
func (*Client) ReadingsByDeviceNameAndResourceNameAndTimeRange ¶
func (*Client) ReadingsByDeviceNameAndResourceNamesAndTimeRange ¶
func (*Client) ReadingsByDeviceNameAndTimeRange ¶
func (*Client) ReadingsByResourceName ¶
func (c *Client) ReadingsByResourceName(offset int, limit int, resourceName string) (readings []model.Reading, edgeXerr errors.EdgeX)
ReadingsByResourceName query readings by offset, limit and resource name
func (*Client) ReadingsByResourceNameAndTimeRange ¶
func (c *Client) ReadingsByResourceNameAndTimeRange(resourceName string, start int64, end int64, offset int, limit int) (readings []model.Reading, err errors.EdgeX)
ReadingsByResourceNameAndTimeRange query readings by resourceName and specified time range. Readings are sorted in descending order of origin time.
func (*Client) ReadingsByTimeRange ¶
func (c *Client) ReadingsByTimeRange(start int64, end int64, offset int, limit int) (readings []model.Reading, edgeXerr errors.EdgeX)
ReadingsByTimeRange query readings by time range, offset, and limit
func (*Client) RegistrationByServiceId ¶
func (*Client) Registrations ¶
func (c *Client) Registrations() ([]model.Registration, errors.EdgeX)
func (*Client) SubscriptionById ¶
func (c *Client) SubscriptionById(id string) (subscription model.Subscription, edgexErr errors.EdgeX)
SubscriptionById gets a subscription by id
func (*Client) SubscriptionByName ¶
func (c *Client) SubscriptionByName(name string) (subscription model.Subscription, edgeXerr errors.EdgeX)
SubscriptionByName queries subscription by name
func (*Client) SubscriptionCountByCategory ¶
SubscriptionCountByCategory returns the count of Subscription associated with specified category from the database
func (*Client) SubscriptionCountByLabel ¶
SubscriptionCountByLabel returns the count of Subscription associated with specified label from the database
func (*Client) SubscriptionCountByReceiver ¶
SubscriptionCountByReceiver returns the count of Subscription associated with specified receiver from the database
func (*Client) SubscriptionTotalCount ¶
SubscriptionTotalCount returns the total count of Subscription from the database
func (*Client) SubscriptionsByCategoriesAndLabels ¶
func (c *Client) SubscriptionsByCategoriesAndLabels(offset int, limit int, categories []string, labels []string) (subscriptions []model.Subscription, edgeXerr errors.EdgeX)
SubscriptionsByCategoriesAndLabels queries subscriptions by offset, limit, categories and labels
func (*Client) SubscriptionsByCategory ¶
func (c *Client) SubscriptionsByCategory(offset int, limit int, category string) (subscriptions []model.Subscription, edgeXerr errors.EdgeX)
SubscriptionsByCategory queries subscriptions by offset, limit and category
func (*Client) SubscriptionsByLabel ¶
func (c *Client) SubscriptionsByLabel(offset int, limit int, label string) (subscriptions []model.Subscription, edgeXerr errors.EdgeX)
SubscriptionsByLabel queries subscriptions by offset, limit and label
func (*Client) SubscriptionsByReceiver ¶
func (c *Client) SubscriptionsByReceiver(offset int, limit int, receiver string) (subscriptions []model.Subscription, edgeXerr errors.EdgeX)
SubscriptionsByReceiver queries subscriptions by offset, limit and receiver
func (*Client) TransmissionById ¶
TransmissionById gets a transmission by id
func (*Client) TransmissionCountByNotificationId ¶
TransmissionCountByNotificationId returns the count of Transmission associated with specified notification id from the database
func (*Client) TransmissionCountByStatus ¶
TransmissionCountByStatus returns the count of Transmission associated with specified status name from the database
func (*Client) TransmissionCountBySubscriptionName ¶
func (c *Client) TransmissionCountBySubscriptionName(subscriptionName string) (uint32, errors.EdgeX)
TransmissionCountBySubscriptionName returns the count of Transmission associated with specified subscription name from the database
func (*Client) TransmissionCountByTimeRange ¶
TransmissionCountByTimeRange returns the count of Transmission from the database within specified time range
func (*Client) TransmissionTotalCount ¶
TransmissionTotalCount returns the total count of Transmission from the database
func (*Client) TransmissionsByNotificationId ¶
func (c *Client) TransmissionsByNotificationId(offset int, limit int, id string) (transmissions []model.Transmission, err errors.EdgeX)
TransmissionsByNotificationId queries transmissions by offset, limit and notification id
func (*Client) TransmissionsByStatus ¶
func (c *Client) TransmissionsByStatus(offset int, limit int, status string) (transmissions []model.Transmission, err errors.EdgeX)
TransmissionsByStatus queries transmissions by offset, limit and status
func (*Client) TransmissionsBySubscriptionName ¶
func (c *Client) TransmissionsBySubscriptionName(offset int, limit int, subscriptionName string) (transmissions []model.Transmission, err errors.EdgeX)
TransmissionsBySubscriptionName queries transmissions by offset, limit and subscription name
func (*Client) TransmissionsByTimeRange ¶
func (c *Client) TransmissionsByTimeRange(start int64, end int64, offset int, limit int) (transmissions []model.Transmission, err errors.EdgeX)
TransmissionsByTimeRange query transmissions by time range, offset, and limit
func (*Client) UpdateDevice ¶
Update a device
func (*Client) UpdateDeviceProfile ¶
func (c *Client) UpdateDeviceProfile(dp model.DeviceProfile) errors.EdgeX
UpdateDeviceProfile updates a new device profile
func (*Client) UpdateDeviceService ¶
func (c *Client) UpdateDeviceService(ds model.DeviceService) errors.EdgeX
UpdateDeviceService updates a device service
func (*Client) UpdateNotification ¶
func (c *Client) UpdateNotification(n model.Notification) errors.EdgeX
UpdateNotification updates a notification
func (*Client) UpdateProvisionWatcher ¶
func (c *Client) UpdateProvisionWatcher(pw model.ProvisionWatcher) errors.EdgeX
Update a provision watcher
func (*Client) UpdateRegistration ¶
func (c *Client) UpdateRegistration(r model.Registration) errors.EdgeX
func (*Client) UpdateSubscription ¶
func (c *Client) UpdateSubscription(subscription model.Subscription) errors.EdgeX
UpdateSubscription updates a new subscription
func (*Client) UpdateTransmission ¶
func (c *Client) UpdateTransmission(trans model.Transmission) errors.EdgeX
UpdateTransmission updates a transmission