Documentation
¶
Index ¶
- type Manager
- func (m *Manager) Allocate(authInfo *srpc.AuthInformation, request proto.AllocateRequest) (proto.AllocateResponse, error)
- func (m *Manager) CancelAllocation(authInfo *srpc.AuthInformation, requestId proto.RequestId) error
- func (m *Manager) GetUpdateQueue() queue.BroadcastQueue[proto.AllocationUpdateEntry]
- func (m *Manager) UpdateTopology(t *topology.Topology)
- func (m *Manager) WriteHtml(writer io.Writer)
- type Options
- type Params
- type Storer
- type UpdateChannelMaker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) Allocate ¶
func (m *Manager) Allocate(authInfo *srpc.AuthInformation, request proto.AllocateRequest) (proto.AllocateResponse, error)
Allocate issues an allocation request. It blocks until the allocator is ready.
func (*Manager) CancelAllocation ¶
CancelAllocation cancels an allocation request (that has not yet been completed/fulfilled). It blocks until the allocator is ready.
func (*Manager) GetUpdateQueue ¶
func (m *Manager) GetUpdateQueue() queue.BroadcastQueue[proto.AllocationUpdateEntry]
func (*Manager) UpdateTopology ¶
type Params ¶
type Params struct {
Logger log.DebugLogger
Storer Storer
UpdateChannelMaker UpdateChannelMaker
}
type Storer ¶
type Storer interface {
DeleteUpdate(position uint64) error
DeleteUserRequest(username types.Username, reqId proto.RequestId) error
ReadUpdates() (uint64, []proto.AllocationUpdateEntry, error)
ReadUsersQueue() (usernames []types.Username, err error)
ReadUserQueue(username types.Username) (
requestIDs []proto.RequestId, err error)
ReadUserRequest(username types.Username, requestId proto.RequestId) (
proto.AllocateRequest, error)
WriteUpdate(update proto.AllocationUpdateEntry, position uint64) error
WriteUsersQueue(usernames []types.Username) error
WriteUserQueue(username types.Username, requestIDs []proto.RequestId) error
WriteUserRequest(username types.Username, reqId proto.RequestId,
req proto.AllocateRequest) error
}
type UpdateChannelMaker ¶
Click to show internal directories.
Click to hide internal directories.