store

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InstanceEntry

type InstanceEntry struct {
	Instance         core.Instance
	LastEvent        core.InstanceEvent
	UnreportedEvents []core.InstanceEvent
}

type Store

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

func NewStore

func NewStore(path string) (*Store, error)

func (*Store) Close

func (s *Store) Close() error

func (*Store) CreateInstance

func (s *Store) CreateInstance(instance core.Instance, event core.InstanceEvent) error

func (*Store) DeleteReservation

func (s *Store) DeleteReservation(id string) error

func (*Store) DestroyInstanceBucket

func (s *Store) DestroyInstanceBucket(id string) error

func (*Store) Init

func (s *Store) Init() error

func (*Store) LoadInstances

func (s *Store) LoadInstances() ([]InstanceEntry, error)

func (*Store) LoadReservations

func (s *Store) LoadReservations() ([]structs.Reservation, error)

func (*Store) PutReservation

func (s *Store) PutReservation(r structs.Reservation) error

func (*Store) SetLastReportedEventId added in v0.0.2

func (s *Store) SetLastReportedEventId(instanceId string, eventId ulid.ULID) error

func (*Store) UpdateInstance

func (s *Store) UpdateInstance(instance core.Instance, event core.InstanceEvent) error

Jump to

Keyboard shortcuts

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