dummy

package
v0.0.0-...-e1efe0e Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct{}

Backend implements a dummy emulator backend that returns ErrUnsupportedRequest for all incoming requests.

func NewDummyBackend

func NewDummyBackend() *Backend

NewDummyBackend returns a dummy backend instance.

func (*Backend) HandleRequest

func (b *Backend) HandleRequest(clientID string, req protocol.Request) (protocol.Response, error)

HandleRequest processes a decoded client request and returns back a Response payload. The dummy payload always returns ErrUnsupportedRequest

func (*Backend) Name

func (b *Backend) Name() string

Name returns the name of the backend.

func (*Backend) RemoveClient

func (b *Backend) RemoveClient(clientID string) error

RemoveClient is invoked when a particular client disconnects and allows the backend to perform any required state cleanup tasks.

Jump to

Keyboard shortcuts

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