asynchronousIO

package module
v0.0.0-...-384d90b Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2019 License: MIT Imports: 1 Imported by: 3 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

asynchronousIO

a package load information asynchronously

Documentation

Index

Constants

View Source
const UnknownType uint16 = 0xffff

Variables

This section is empty.

Functions

This section is empty.

Types

type AsynchronousIOError

type AsynchronousIOError struct {
	E error
}

func (AsynchronousIOError) Error

func (e AsynchronousIOError) Error() string

func (AsynchronousIOError) GetKey

func (AsynchronousIOError) GetKey() Key

type AsynchronousIOMachine

type AsynchronousIOMachine interface {
	Load(key Key, source uint16) func() (Bean, error)
	Save(bean Bean, source uint16)
	// must call the return function
	Delete(key Key, source uint16) func() error
	SaveAndCallBackWhenFinish(bean Bean, source uint16) func() error
}

type Bean

type Bean interface {
	GetKey() Key
}

type CmdTable

type CmdTable interface {
	Save(k int64, bean Bean, notify bool, cs *sync.Pool) (c chan Bean, start bool)
	Load(k int64, cs *sync.Pool) (c chan Bean, bean Bean)
	Delete(k int64, cs *sync.Pool) (c chan Bean, start bool)
	Get(k int64, lastCmd uint8, lastBean Bean) (cmd uint8, bean Bean, c chan Bean, restart bool)
}

type DataSource

type DataSource interface {
	Load(key Key) (Bean, error)
	Save(bean Bean) error
	Delete(key Key) error
}

type Finish

type Finish struct{}

func (Finish) GetKey

func (Finish) GetKey() Key

type Key

type Key interface {
	UniqueId() (int64, bool)
	ToString() (string, bool)
	TypeId() int64
}

type MemorySource

type MemorySource interface {
	Alloc(length int) interface{}
	Free(interface{})
}

type Start

type Start struct{}

func (Start) GetKey

func (Start) GetKey() Key

type UnknownTypeError

type UnknownTypeError struct{}

func (UnknownTypeError) Error

func (UnknownTypeError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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