buses

package
v0.0.0-...-33acbe3 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2020 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 Bus

type Bus interface {
	Read(key string) interface{}
	Write(key string, data interface{})
	GetLock() *sync.Mutex
}

func NewDictBus

func NewDictBus() Bus

func NewMockBus

func NewMockBus(r MockBusRead, w MockBusWrite, l MockBusLock) Bus

type BusCreator

type BusCreator func() Bus

func (*BusCreator) UnmarshalJSON

func (b *BusCreator) UnmarshalJSON(data []byte) error

type DictBus

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

DictBus - simple dict data bass

func (*DictBus) GetLock

func (b *DictBus) GetLock() *sync.Mutex

GetLock - return lock for

func (*DictBus) Read

func (b *DictBus) Read(key string) interface{}

func (*DictBus) Write

func (b *DictBus) Write(key string, data interface{})

type MockBus

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

DictBus - simple dict data bass

func (*MockBus) GetLock

func (b *MockBus) GetLock() *sync.Mutex

func (*MockBus) Read

func (b *MockBus) Read(key string) interface{}

func (*MockBus) Write

func (b *MockBus) Write(key string, data interface{})

type MockBusLock

type MockBusLock func() *sync.Mutex

type MockBusRead

type MockBusRead func(key string) interface{}

type MockBusWrite

type MockBusWrite func(key string, data interface{})

Jump to

Keyboard shortcuts

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