Documentation ¶
Index ¶
Constants ¶
View Source
const NullStateAddress = StateAddress(0)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AtomBehaviour ¶
type AtomBehaviour struct { Reads []StateAddress // States read by an atom. Modifies []StateAddress // States read and written by an atom. Writes []StateAddress // States written by an atom. Roots []StateAddress // States labeled as root by an atom. KeepAlive bool // Force the atom to be live. Aborted bool // Mutation of this command aborts. }
func (*AtomBehaviour) Modify ¶
func (b *AtomBehaviour) Modify(g *DependencyGraph, state StateKey)
func (*AtomBehaviour) Read ¶
func (b *AtomBehaviour) Read(g *DependencyGraph, state StateKey)
func (*AtomBehaviour) Write ¶
func (b *AtomBehaviour) Write(g *DependencyGraph, state StateKey)
type BehaviourProvider ¶
type BehaviourProvider interface {
GetBehaviourForAtom(context.Context, *api.State, api.CmdID, api.Cmd, *DependencyGraph) AtomBehaviour
}
type DependencyGraph ¶
type DependencyGraph struct { Commands []api.Cmd // Atom list which this graph was build for. Behaviours []AtomBehaviour // State reads/writes for each atom (graph edges). Roots map[StateAddress]bool // State to mark live at requested atoms. // contains filtered or unexported fields }
func GetDependencyGraph ¶
func GetDependencyGraph(ctx context.Context) (*DependencyGraph, error)
func (*DependencyGraph) GetHierarchyStateMap ¶
func (g *DependencyGraph) GetHierarchyStateMap() map[StateAddress]StateAddress
func (*DependencyGraph) GetStateAddressOf ¶
func (g *DependencyGraph) GetStateAddressOf(key StateKey) StateAddress
func (*DependencyGraph) Print ¶
func (g *DependencyGraph) Print(ctx context.Context, b *AtomBehaviour)
func (*DependencyGraph) SetRoot ¶
func (g *DependencyGraph) SetRoot(key StateKey)
type DependencyGraphBehaviourProvider ¶
type DependencyGraphBehaviourProvider interface {
GetDependencyGraphBehaviourProvider(ctx context.Context) BehaviourProvider
}
type StateAddress ¶
type StateAddress uint32
type StateKey ¶
type StateKey interface { // Parent returns enclosing state (and this state is strict subset of it). // This allows efficient implementation of operations which access a lot state. Parent() StateKey }
State key uniquely represents part of the GL state. Think of it as memory range (which stores the state data).
Click to show internal directories.
Click to hide internal directories.