pkg

package
v0.0.0-...-757bf47 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ArcStorageAPI Arc Storage Data API
	ArcStorageAPI = "Arc Storage Data"
	// DataBaseName arc
	DataBaseName = "arc"
)
View Source
const (
	// Success -
	Success = 0
)
View Source
const (
	// TypeArc "Arc"
	TypeArc = "Arc"
)

Variables

View Source
var ArcStorageVersion = "appversion"

ArcStorageVersion add to file suffix name

Functions

func ByteToUInt64

func ByteToUInt64(sensorID []byte) uint64

ByteToUInt64 convert sensor []byte to uint64.

func ParsedFrameConstructor

func ParsedFrameConstructor(segmentData protocols.ISegment, id uint64, timestamp time.Time) ([]byte, error)

ParsedFrameConstructor - construct frame structure

Types

type ArcStorage

type ArcStorage struct {
	// contains filtered or unexported fields
}

ArcStorage arc storage struct

func NewArcStorage

func NewArcStorage(config *config.ArcConfig, logger logging.ILogger, gossipKVCache *microComponent.GossipKVCacheComponent, k kafka.Handler) (*ArcStorage, error)

NewArcStorage Instantiation object

func (*ArcStorage) Close

func (arc *ArcStorage) Close()

Close kafka & haystack store

func (*ArcStorage) SetupWeb

func (arc *ArcStorage) SetupWeb(root echoswagger.ApiRoot, base, selfServiceName string)

SetupWeb Set interface

func (*ArcStorage) Start

func (arc *ArcStorage) Start(stop chan struct{})

Start Connect kafka Store & taoClient

type SensorIDResponse

type SensorIDResponse struct {
	Code int      `json:"code,omitempty"`
	Msg  string   `json:"msg,omitempty"`
	Data []string `json:"data,omitempty"`
}

SensorIDResponse is the response for getting sensor ids

type SensorItem

type SensorItem struct {
	SensorID     string      `json:"sensorid,omitempty"`
	DataType     string      `json:"data_type,omitempty"`
	Query        SensorQuery `json:"query,omitempty"`
	TimeFrom     int64       `json:"time_from,omitempty"`
	TimeTo       int64       `json:"time_to,omitempty"`
	TimeDuration int64       `json:"time_duration,omitempty"`
}

SensorItem response sensor information

type SensorQuery

type SensorQuery struct {
	URL      string `json:"url,omitempty"`
	Scheme   string `json:"scheme,omitempty"`
	Domain   string `json:"domain,omitempty"`
	Port     int    `json:"port,omitempty"`
	FullPath string `json:"full_path,omitempty"`
	Path     string `json:"path,omitempty"`
	SensorID string `json:"sensorid,omitempty"`
	Type     string `json:"type,omitempty"`
	TimeFrom int64  `json:"time_from,omitempty"`
	TimeTo   int64  `json:"time_to,omitempty"`
}

SensorQuery query details

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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