noise: github.com/perlin-network/noise/callbacks Index | Files

package callbacks

import "github.com/perlin-network/noise/callbacks"

Index

Package Files

mod.go reduce.go sequential.go

Variables

var Deregister = errors.New("callback deregistered")

type Callback Uses

type Callback func(params ...interface{}) error

type ReduceCallback Uses

type ReduceCallback func(in interface{}, params ...interface{}) (interface{}, error)

type ReduceCallbackManager Uses

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

func NewReduceCallbackManager Uses

func NewReduceCallbackManager() *ReduceCallbackManager

func (*ReduceCallbackManager) RegisterCallback Uses

func (m *ReduceCallbackManager) RegisterCallback(c ReduceCallback)

func (*ReduceCallbackManager) RunCallbacks Uses

func (m *ReduceCallbackManager) RunCallbacks(in interface{}, params ...interface{}) (res interface{}, errs []error)

RunCallbacks runs all callbacks on a variadic parameter list, and de-registers callbacks that throw an error.

func (*ReduceCallbackManager) UnsafelySetReverse Uses

func (m *ReduceCallbackManager) UnsafelySetReverse() *ReduceCallbackManager

type SequentialCallbackManager Uses

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

func NewSequentialCallbackManager Uses

func NewSequentialCallbackManager() *SequentialCallbackManager

func (*SequentialCallbackManager) RegisterCallback Uses

func (m *SequentialCallbackManager) RegisterCallback(callbacks ...Callback)

RegisterCallback atomically registers all callbacks passed in.

func (*SequentialCallbackManager) RunCallbacks Uses

func (m *SequentialCallbackManager) RunCallbacks(params ...interface{}) []error

RunCallbacks runs all callbacks on a variadic parameter list, and de-registers callbacks that throw an error.

func (*SequentialCallbackManager) Trim Uses

func (m *SequentialCallbackManager) Trim()

func (*SequentialCallbackManager) UnsafelySetReverse Uses

func (m *SequentialCallbackManager) UnsafelySetReverse() *SequentialCallbackManager

Package callbacks imports 4 packages (graph) and is imported by 1 packages. Updated 2019-02-19. Refresh now. Tools for package owners.