agent

package
v0.2.0-beta Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewBotClient

func NewBotClient(natsURL, deviceID string, opts ...Option) (*Client, error)

func (*Client) Back

func (c *Client) Back() error

func (*Client) Close

func (c *Client) Close() error

func (*Client) Deploy

func (c *Client) Deploy(strategy string) error

func (*Client) EventBus

func (c *Client) EventBus() *bus.EventBus

func (*Client) GetState

func (c *Client) GetState() *bus.GameStateEvent

GetState returns the most recent state event. The returned event is a LIVE reference to the stored message (a protobuf, which must never be copied): treat it as read-only, and do not retain it across calls — a newer event replaces it at any time.

func (*Client) ReturnHome

func (c *Client) ReturnHome() error

func (*Client) SkipBase

func (c *Client) SkipBase() error

func (*Client) Swipe

func (c *Client) Swipe(x1, y1, x2, y2, durationMS int) error

func (*Client) Tap

func (c *Client) Tap(x, y int) error

func (*Client) WaitForBotState

func (c *Client) WaitForBotState(state string, timeout time.Duration) error

func (*Client) WaitForCondition

func (c *Client) WaitForCondition(fn func(*bus.GameStateEvent) bool, timeout time.Duration) error

func (*Client) WaitForState

func (c *Client) WaitForState(target bus.GameState, timeout time.Duration) error

func (*Client) ZoomIn

func (c *Client) ZoomIn() error

func (*Client) ZoomOut

func (c *Client) ZoomOut() error

type Option

type Option func(*options)

func WithNATSURL

func WithNATSURL(url string) Option

Jump to

Keyboard shortcuts

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