types

package
v0.0.0-...-e079363 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EquivClass

type EquivClass uint64

type JobID

type JobID uint64

type JobMap

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

func NewJobMap

func NewJobMap() *JobMap

func (*JobMap) ContainsKey

func (jm *JobMap) ContainsKey(k JobID) bool

func (*JobMap) FindCopy

func (jm *JobMap) FindCopy(k JobID, val *pb.JobDescriptor) bool

func (*JobMap) FindPtrOrNull

func (jm *JobMap) FindPtrOrNull(k JobID) *pb.JobDescriptor

func (*JobMap) FindWithDefault

func (jm *JobMap) FindWithDefault(k JobID, dV *pb.JobDescriptor) *pb.JobDescriptor

func (*JobMap) InsertIfNotPresent

func (jm *JobMap) InsertIfNotPresent(k JobID, val *pb.JobDescriptor) bool

func (*JobMap) InsertOrUpdate

func (jm *JobMap) InsertOrUpdate(k JobID, val *pb.JobDescriptor) bool

func (*JobMap) RLock

func (jm *JobMap) RLock()

func (*JobMap) RUnlock

func (jm *JobMap) RUnlock()

func (*JobMap) UnsafeGet

func (jm *JobMap) UnsafeGet() map[JobID]*pb.JobDescriptor

type ResourceID

type ResourceID uint64

type ResourceMap

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

Thread safe maps: Acquire and release lock on read/write When initializing the map type, make sure to make map NOTE: These maps only take pointer values, so change wherever a direct struct is passed below

func NewResourceMap

func NewResourceMap() *ResourceMap

Get new maps

func (*ResourceMap) ContainsKey

func (rm *ResourceMap) ContainsKey(k ResourceID) bool

Test to see if a map contains a particular key. Returns true if the key is in the collection.

func (*ResourceMap) FindCopy

func (rm *ResourceMap) FindCopy(k ResourceID, val *rs.ResourceStatus) bool

Perform a lookup in map. If the key is present and value is non-NULL then a copy of the value associated with the key is made into *val. Returns whether key was present.

func (*ResourceMap) FindPtrOrNull

func (rm *ResourceMap) FindPtrOrNull(k ResourceID) *rs.ResourceStatus

Perform a lookup in a map whose values are pointers. If the key is present a const pointer to the associated value is returned, otherwise a NULL pointer is returned. This function does not distinguish between a missing key and a key mapped to a NULL value.

func (*ResourceMap) FindWithDefault

func (rm *ResourceMap) FindWithDefault(k ResourceID, dV *rs.ResourceStatus) *rs.ResourceStatus

Perform a lookup in a map. If the key is present in the map then the value associated with that key is returned, otherwise the value passed as a default is returned.

func (*ResourceMap) InsertIfNotPresent

func (rm *ResourceMap) InsertIfNotPresent(k ResourceID, val *rs.ResourceStatus) bool

Insert a new key and value into a map. If the key is not present in the map the key and value are inserted, otherwise nothing happens. True indicates that an insert took place, false indicates the key was already present.

func (*ResourceMap) InsertOrUpdate

func (rm *ResourceMap) InsertOrUpdate(k ResourceID, val *rs.ResourceStatus) bool

Change the value associated with a particular key in a map If the key is not present in the map the key and value are inserted, otherwise the value is updated to be a copy of the value provided. True indicates that an insert took place, false indicates an update.

func (*ResourceMap) RLock

func (rm *ResourceMap) RLock()

Expose read lock, need to be careful not to deadlock

func (*ResourceMap) RUnlock

func (rm *ResourceMap) RUnlock()

Expose read unlock

func (*ResourceMap) UnsafeGet

func (rm *ResourceMap) UnsafeGet() map[ResourceID]*rs.ResourceStatus

Expose Map for readonly purposes. To be used with Rlock() and RUnlock()

type TaskID

type TaskID uint64

type TaskMap

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

func NewTaskMap

func NewTaskMap() *TaskMap

func (*TaskMap) ContainsKey

func (tm *TaskMap) ContainsKey(k TaskID) bool

func (*TaskMap) FindCopy

func (tm *TaskMap) FindCopy(k TaskID, val *pb.TaskDescriptor) bool

func (*TaskMap) FindPtrOrNull

func (tm *TaskMap) FindPtrOrNull(k TaskID) *pb.TaskDescriptor

func (*TaskMap) FindWithDefault

func (tm *TaskMap) FindWithDefault(k TaskID, dV *pb.TaskDescriptor) *pb.TaskDescriptor

func (*TaskMap) InsertIfNotPresent

func (tm *TaskMap) InsertIfNotPresent(k TaskID, val *pb.TaskDescriptor) bool

func (*TaskMap) InsertOrUpdate

func (tm *TaskMap) InsertOrUpdate(k TaskID, val *pb.TaskDescriptor) bool

func (*TaskMap) RLock

func (tm *TaskMap) RLock()

func (*TaskMap) RUnlock

func (tm *TaskMap) RUnlock()

func (*TaskMap) UnsafeGet

func (tm *TaskMap) UnsafeGet() map[TaskID]*pb.TaskDescriptor

type TaskOutputID

type TaskOutputID uint32

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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