state

package
v0.8.11 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StateModule = fx.Module("centrum_state", fx.Provide(
	New,
))

Functions

This section is empty.

Types

type State

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

func New added in v0.8.8

func New(cfg *config.Config) *State

func (*State) ClearUnitLock added in v0.8.11

func (s *State) ClearUnitLock(unitId uint64)

func (*State) DeleteDispatch added in v0.8.11

func (s *State) DeleteDispatch(job string, id uint64)

func (*State) DeleteUnit added in v0.8.11

func (s *State) DeleteUnit(job string, id uint64)

func (*State) FilterDispatches added in v0.8.9

func (s *State) FilterDispatches(job string, statuses []dispatch.StatusDispatch, notStatuses []dispatch.StatusDispatch) []*dispatch.Dispatch

func (*State) FilterUnits added in v0.8.10

func (s *State) FilterUnits(job string, statuses []dispatch.StatusUnit, notStatuses []dispatch.StatusUnit) []*dispatch.Unit

func (*State) GetDispatch added in v0.8.8

func (s *State) GetDispatch(job string, id uint64) (*dispatch.Dispatch, bool)

func (*State) GetDispatchLocations added in v0.8.11

func (s *State) GetDispatchLocations(job string) *coords.Coords[*dispatch.Dispatch]

func (*State) GetDispatchesJobs added in v0.8.11

func (s *State) GetDispatchesJobs() []string

func (*State) GetDispatchesMap added in v0.8.8

func (s *State) GetDispatchesMap(job string) *xsync.MapOf[uint64, *dispatch.Dispatch]

func (*State) GetDisponents added in v0.8.8

func (s *State) GetDisponents(job string) []*users.UserShort

func (*State) GetSettings added in v0.8.8

func (s *State) GetSettings(job string) *dispatch.Settings

func (*State) GetUnit added in v0.8.8

func (s *State) GetUnit(job string, id uint64) (*dispatch.Unit, bool)

func (*State) GetUnitIDForUserID added in v0.8.8

func (s *State) GetUnitIDForUserID(userId int32) (uint64, bool)

func (*State) GetUnitLock added in v0.8.11

func (s *State) GetUnitLock(unitId uint64) *sync.Mutex

func (*State) GetUnitsJobs added in v0.8.11

func (s *State) GetUnitsJobs() []string

func (*State) GetUnitsMap added in v0.8.8

func (s *State) GetUnitsMap(job string) *xsync.MapOf[uint64, *dispatch.Unit]

func (*State) GetUserUnitID added in v0.8.11

func (s *State) GetUserUnitID(userId int32) (uint64, bool)

func (*State) ListDispatches added in v0.8.8

func (s *State) ListDispatches(job string) []*dispatch.Dispatch

func (*State) ListSettings added in v0.8.11

func (s *State) ListSettings() []*dispatch.Settings

func (*State) ListUnits added in v0.8.8

func (s *State) ListUnits(job string) ([]*dispatch.Unit, bool)

func (*State) SetUnitForUser added in v0.8.11

func (s *State) SetUnitForUser(userId int32, unitId uint64)

func (*State) UnsetUnitIDForUser added in v0.8.11

func (s *State) UnsetUnitIDForUser(userId int32)

func (*State) UpdateDispatch added in v0.8.11

func (s *State) UpdateDispatch(job string, dispatchId uint64, dsp *dispatch.Dispatch) error

func (*State) UpdateDisponents added in v0.8.11

func (s *State) UpdateDisponents(job string, disponents []*users.UserShort)

func (*State) UpdateSettings added in v0.8.11

func (s *State) UpdateSettings(job string, in *dispatch.Settings) error

func (*State) UpdateUnit added in v0.8.11

func (s *State) UpdateUnit(job string, unitId uint64, unit *dispatch.Unit) error

Jump to

Keyboard shortcuts

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