readersvc

package
v0.0.0-...-05bc493 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAdapterComponent

func NewAdapterComponent(cfg smadapter.Config, ps crypto.PlatformScheme, provider readbundle.Provider) managed.Component

Types

type Adapter

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

func NewAdapter

func NewAdapter(adapterID smachine.AdapterID, executor smachine.AdapterExecutor, service Service) Adapter

func (Adapter) PrepareNotify

func (v Adapter) PrepareNotify(ctx smachine.ExecutionContext, callFn func(Service)) smachine.NotifyRequester

func (Adapter) SendNotify

func (v Adapter) SendNotify(ctx smachine.LimitedExecutionContext, callFn func(Service))

func (Adapter) ServiceNeedsBatching

func (v Adapter) ServiceNeedsBatching() bool

type Cabinet

type Cabinet interface {
	PulseNumber() pulse.Number

	Open() error
	io.Closer
}

type Service

type Service interface {
	FindCabinet(pulse.Number) (Cabinet, error)
	ReadFromCabinet(Cabinet, jet.DropID, func(readbundle.Reader) error) error

	// NeedsBatching is (true) when readers must be organized in batches, also FindCabinet will return error while the cabinet is opened.
	// When NeedsBatching is (false) then every reader can open cabinets independently.
	NeedsBatching() bool
}

func GetServiceForTestOnly

func GetServiceForTestOnly(a Adapter) Service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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