statuscache

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package characterstatus is a service which provides cached access to the current update status of general and character sections.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StatusCacheService

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

StatusCacheService provides cached access to the current update status of all characters to improve performance of UI refresh tickers.

func New

New creates and returns a new instance of a character status service. When nil is provided it will create and use it's own cache instance.

func (*StatusCacheService) CharacterSectionExists

func (sc *StatusCacheService) CharacterSectionExists(characterID int32, section app.CharacterSection) bool

CharacterSectionExists reports wether a character section exists.

func (*StatusCacheService) CharacterSectionGet

func (sc *StatusCacheService) CharacterSectionGet(characterID int32, section app.CharacterSection) (app.SectionStatus, bool)

func (*StatusCacheService) CharacterSectionList

func (sc *StatusCacheService) CharacterSectionList(characterID int32) []app.SectionStatus

func (*StatusCacheService) CharacterSectionSet

func (sc *StatusCacheService) CharacterSectionSet(o *app.CharacterSectionStatus)

func (*StatusCacheService) CharacterSectionSummary

func (sc *StatusCacheService) CharacterSectionSummary(characterID int32) app.StatusSummary

func (*StatusCacheService) GeneralSectionExists

func (sc *StatusCacheService) GeneralSectionExists(section app.GeneralSection) bool

func (*StatusCacheService) GeneralSectionGet

func (sc *StatusCacheService) GeneralSectionGet(section app.GeneralSection) (app.SectionStatus, bool)

func (*StatusCacheService) GeneralSectionList

func (sc *StatusCacheService) GeneralSectionList() []app.SectionStatus

func (*StatusCacheService) GeneralSectionSet

func (sc *StatusCacheService) GeneralSectionSet(o *app.GeneralSectionStatus)

func (*StatusCacheService) GeneralSectionSummary

func (sc *StatusCacheService) GeneralSectionSummary() app.StatusSummary

func (*StatusCacheService) InitCache

InitCache initializes the internal state from local storage. It should always be called once for a new instance to ensure the cache is current.

func (*StatusCacheService) ListCharacters

func (sc *StatusCacheService) ListCharacters() []*app.CharacterShort

func (*StatusCacheService) SectionList

func (sc *StatusCacheService) SectionList(entityID int32) []app.SectionStatus

func (*StatusCacheService) Summary

func (sc *StatusCacheService) Summary() app.StatusSummary

Summary returns the current summary status in percent of fresh sections and the number of missing and errors.

func (*StatusCacheService) UpdateCharacters

func (sc *StatusCacheService) UpdateCharacters(ctx context.Context, r app.StatusCacheStorage) error

Jump to

Keyboard shortcuts

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