model

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Type          string     `bson:"type,omitempty"           json:"type"`
	Service       string     `bson:"service,omitempty"    	  json:"service"`
	Time          *time.Time `bson:"time,omitempty"           json:"time"`
	Message       string     `bson:"message,omitempty"        json:"message"`
	MessageOffset string     `bson:"message_offset,omitempty" json:"message_offset"`
}

Event struct including the time

func (*Event) EqualsIgnoreTime

func (e *Event) EqualsIgnoreTime(that *Event) bool

EqualsIgnoreTime compares the provided event message and offset with the pointer receiver.

type Instance

type Instance struct {
	InstanceID                string   `json:"id"`
	NumberOfObservations      int64    `json:"total_observations"`
	TotalInsertedObservations int64    `json:"total_inserted_observations,omitempty"`
	State                     string   `json:"state"`
	Events                    []*Event `json:"events,omitempty"`
}

Instance provides a struct for all the instance information

func (*Instance) ContainsEvent

func (i *Instance) ContainsEvent(target *Event) bool

type ReportEvent

type ReportEvent struct {
	InstanceID  string `avro:"instance_id"`
	EventType   string `avro:"event_type"`
	EventMsg    string `avro:"event_message"`
	ServiceName string `avro:"service_name"`
}

ReportEvent is a struct for eventhandler which handles the instance and the start of the api

func (*ReportEvent) GenCacheKeyAndValue

func (e *ReportEvent) GenCacheKeyAndValue() ([]byte, []byte, error)

type State

type State struct {
	State string `json:"state"`
}

State struct representing the state of the dataset.

Jump to

Keyboard shortcuts

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