modem

package
v0.101.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockModem

type MockModem struct {
	mock.Mock
}

MockModem is an autogenerated mock type for the Modem type

func (*MockModem) AddService

func (_m *MockModem) AddService(name string, _a1 runner.Service) error

AddService provides a mock function with given fields: name, _a1

func (*MockModem) Call

func (_m *MockModem) Call(ctx context.Context, service string, endpoint string, arguments map[string]interface{}, fd string) ([]byte, error)

Call provides a mock function with given fields: ctx, service, endpoint, arguments, fd

func (*MockModem) Destroy

func (_m *MockModem) Destroy() error

Destroy provides a mock function with given fields:

func (*MockModem) Init

func (_m *MockModem) Init() error

Init provides a mock function with given fields:

type Modem

type Modem interface {
	ServiceCaller
	Init() error
	Destroy() error
	AddService(name string, runner runner.Service) error
}

Modem holds all the connection the external services

func New

func New(opt *Options) Modem

New build Modem from options

type Options

type Options struct {
	Logger logger.Logger
}

Options to build new Modem

type ServiceCaller

type ServiceCaller interface {
	Call(ctx context.Context, service string, endpoint string, arguments map[string]interface{}, fd string) ([]byte, error)
}

ServiceCaller describes the interface to call the external service

Jump to

Keyboard shortcuts

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