internal

package
v0.0.0-...-fa8d222 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPort = 8081
View Source
const MessageKey = "msg"
View Source
const TimeKey = "time"

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Time    string            `json:"time"`
	Labels  map[string]string `json:"labels"`
	Message string            `json:"message"`
}

func ParseEvent

func ParseEvent(eventString string) (*Event, error)

func (*Event) Marshal

func (e *Event) Marshal() (string, error)

type EventList

type EventList interface {
	Add(*Event) error
	List() ([]*Event, error)
}

type FilesystemDatastore

type FilesystemDatastore struct {
	Path string
	// contains filtered or unexported fields
}

func (*FilesystemDatastore) Add

func (d *FilesystemDatastore) Add(event *Event) error

func (*FilesystemDatastore) Initialize

func (d *FilesystemDatastore) Initialize() error

func (*FilesystemDatastore) List

func (d *FilesystemDatastore) List() ([]*Event, error)

type InMemoryDatastore

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

func (*InMemoryDatastore) Add

func (d *InMemoryDatastore) Add(event *Event) error

func (*InMemoryDatastore) List

func (d *InMemoryDatastore) List() ([]*Event, error)

type Server

type Server struct {
	Events EventList
	Port   int
}

func (*Server) Start

func (s *Server) Start() error

Jump to

Keyboard shortcuts

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