proxy

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChkVfoResponse = protocol.Response{
	Command: protocol.CommandKey("chk_vfo"),
	Data:    []string{"CHKVFO 0"},
	Keys:    []string{""},
	Result:  "0",
}

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Put(protocol.CommandKey, protocol.Response)
	Get(protocol.CommandKey) (protocol.Response, bool)
	Invalidate(protocol.CommandKey)
}

type Proxy

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

func New

func New(rwc io.ReadWriteCloser, trx Transceiver, done <-chan struct{}, trace bool) *Proxy

func NewCached

func NewCached(rwc io.ReadWriteCloser, trx Transceiver, cache Cache, done <-chan struct{}, trace bool) *Proxy

func (*Proxy) Close

func (p *Proxy) Close()

func (*Proxy) Wait

func (p *Proxy) Wait()

type Transceiver

type Transceiver interface {
	Send(context.Context, protocol.Request) (protocol.Response, error)
}

Jump to

Keyboard shortcuts

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