slave

package
v0.0.0-...-2250483 Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWebsocketNotConnected = errors.New("websocket not connected")
	ErrWebsocketClosed       = errors.New("websocket closed before response received")
)

Functions

This section is empty.

Types

type Client

type Client interface {
	Vendor() string

	SendEvent(_ *common.OctopusEvent) (*common.OctopusEvent, error)

	Dispose()
}

type LimbClient

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

func NewLimbClient

func NewLimbClient(vendor string, config *common.Configure, conn *websocket.Conn, out chan<- *common.OctopusEvent) *LimbClient

func (*LimbClient) Dispose

func (lc *LimbClient) Dispose()

func (*LimbClient) SendEvent

func (lc *LimbClient) SendEvent(event *common.OctopusEvent) (*common.OctopusEvent, error)

send event to limb client, and return response

func (*LimbClient) Vendor

func (lc *LimbClient) Vendor() string

type LimbService

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

func NewLimbService

func NewLimbService(config *common.Configure, in <-chan *common.OctopusEvent, out chan<- *common.OctopusEvent) *LimbService

func (*LimbService) ServeHTTP

func (ls *LimbService) ServeHTTP(w http.ResponseWriter, r *http.Request)

handle client connnection

func (*LimbService) Start

func (ls *LimbService) Start()

func (*LimbService) Stop

func (ls *LimbService) Stop()

type OnebotClient

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

func NewOnebotClient

func NewOnebotClient(vendor *common.Vendor, config *common.Configure, conn *websocket.Conn, out chan<- *common.OctopusEvent) *OnebotClient

func (*OnebotClient) Dispose

func (oc *OnebotClient) Dispose()

func (*OnebotClient) SendEvent

func (oc *OnebotClient) SendEvent(event *common.OctopusEvent) (*common.OctopusEvent, error)

send event to onebot client, and return response

func (*OnebotClient) Vendor

func (oc *OnebotClient) Vendor() string

Jump to

Keyboard shortcuts

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