models

package
v3.2.0-dev.30 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

models describes the data types that will be used when storing export data in Redis.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StoredObject

type StoredObject struct {
	// ID uniquely identifies this StoredObject
	ID string `json:"id"`
	// AppServiceKey identifies the app to which this data belongs.
	AppServiceKey string `json:"appServiceKey"`
	// Payload is the data to be exported
	Payload []byte `json:"payload"`
	// RetryCount is how many times this has tried to be exported
	RetryCount int `json:"retryCount"`
	// PipelineId is the ID of the pipeline that needs to be restarted.
	PipelineId string `json:"pipelineId"`
	// PipelinePosition is where to pickup in the pipeline
	PipelinePosition int `json:"pipelinePosition"`
	// Version is a hash of the functions to know if the pipeline has changed.
	Version string `json:"version"`
	// CorrelationID is an identifier provided by EdgeX to track this record as it moves
	CorrelationID string `json:"correlationID"`
	// ContextData is a snapshot of data used by the pipeline at runtime
	ContextData map[string]string
}

StoredObject is the atomic and most abstract description of what is collected by the export store system.

func (*StoredObject) FromContract

func (o *StoredObject) FromContract(c interfaces.StoredObject)

FromContract builds a model out of the supplied contract.

func (StoredObject) MarshalJSON

func (o StoredObject) MarshalJSON() ([]byte, error)

MarshalJSON returns the object as a JSON encoded byte array.

func (StoredObject) ToContract

func (o StoredObject) ToContract() interfaces.StoredObject

ToContract builds a contract out of the supplied model.

func (*StoredObject) UnmarshalJSON

func (o *StoredObject) UnmarshalJSON(data []byte) error

UnmarshalJSON returns an object from JSON.

Jump to

Keyboard shortcuts

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