contracts

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

contracts are implementation agnostic data storage models.

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
	// AppServiceKey identifies the app to which this data belongs.
	AppServiceKey string
	// Payload is the data to be exported
	Payload []byte
	// RetryCount is how many times this has tried to be exported
	RetryCount int
	// PipelineId is the ID of the pipeline that needs to be restarted.
	PipelineId string
	// PipelinePosition is where to pickup in the pipeline
	PipelinePosition int
	// Version is a hash of the functions to know if the pipeline has changed.
	Version string
	// CorrelationID is an identifier provided by EdgeX to track this record as it moves
	CorrelationID string
	// 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 NewStoredObject

func NewStoredObject(appServiceKey string, payload []byte, pipelineId string, pipelinePosition int,
	version string, contextData map[string]string) StoredObject

NewStoredObject creates a new instance of StoredObject and is the preferred way to create one.

func (*StoredObject) ValidateContract

func (o *StoredObject) ValidateContract(IDRequired bool) error

ValidateContract ensures that the required fields are present on the object.

Jump to

Keyboard shortcuts

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