types

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeferedStreamRecord

type DeferedStreamRecord struct {
	Id           MessageId   `json:"i"`
	CreationDate time.Time   `json:"d"`
	Msg          interface{} `json:"m"`
}

Defered stream record to be saved

type IServer added in v1.5.0

type IServer interface {
	Initialize(ctx context.Context) error
	Start() error
	Shutdown() error
	GetWebConfig() *config.WebServerConfig
}

type IStreamIteratorHandler

type IStreamIteratorHandler interface {
	Open() error
	Close() error
	Seek(request *StreamIteratorRequest) error
	SaveSeek() error
	GetNextRecord() (MessageId, interface{}, bool, bool, error)
}

type MessageId

type MessageId = uint64

type Size64

type Size64 = uint64

type StreamInfo

type StreamInfo struct {
	UUID             StreamUUID         `json:"uuid" example:"4ce589e2-b483-467b-8b59-758b339801db"`
	CreationDate     time.Time          `json:"creationDate"`
	LastUpdate       time.Time          `json:"lastUpdate"`
	Properties       StreamProperties   `json:"properties"`
	IngestedMessages StreamMessagesInfo `json:"ingestedMessages"` // messages that have been ingested in the stream
	ReadableMessages StreamMessagesInfo `json:"readableMessages"` // messages that are readable by a consumer
}

func NewStreamInfo

func NewStreamInfo(uuid StreamUUID) *StreamInfo

func (*StreamInfo) MatchFilterProperties

func (s *StreamInfo) MatchFilterProperties(jqFilter *gojq.Query) (bool, error)

func (*StreamInfo) SetProperties

func (s *StreamInfo) SetProperties(properties *StreamProperties)

func (*StreamInfo) UpdateProperties

func (s *StreamInfo) UpdateProperties(properties *StreamProperties)

type StreamInfoDict added in v1.8.0

type StreamInfoDict map[StreamUUID]*StreamInfo

type StreamInfoList

type StreamInfoList []*StreamInfo

type StreamIteratorRequest

type StreamIteratorRequest struct {
	IteratorType       string    `` /* 135-byte string literal not displayed */
	MessageId          MessageId `json:"messageId"`
	Timestamp          time.Time `json:"timestamp"`
	JqFilter           string    `json:"jqFilter"`
	MaxWaitTimeSeconds int       `json:"maxWaitTimeSeconds"`
	Name               string    `json:"name"`
}

type StreamIteratorUUID

type StreamIteratorUUID = uuid.UUID

type StreamMessagesInfo added in v1.8.0

type StreamMessagesInfo struct {
	CptMessages       Size64    `json:"cptMessages" example:"12345"`
	SizeInBytes       Size64    `json:"sizeInBytes" example:"4567890"`
	FirstMsgId        MessageId `json:"firstMsgId"`
	LastMsgId         MessageId `json:"lastMsgId"`
	FirstMsgTimestamp time.Time `json:"firstMsgTimestamp"`
	LastMsgTimestamp  time.Time `json:"fastMsgTimestamp"`
}

type StreamProperties

type StreamProperties = map[string]interface{}

type StreamUUID

type StreamUUID = uuid.UUID

type StreamUUIDList

type StreamUUIDList []StreamUUID

Jump to

Keyboard shortcuts

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