client

package
v0.0.0-...-f0d068a Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: AGPL-3.0 Imports: 12 Imported by: 1

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 New

func New() *Client

func (*Client) Cast

func (c *Client) Cast(ctx context.Context, addr string, url string) (*Status, error)

func (*Client) Reset

func (c *Client) Reset(ctx context.Context, addr string) (*Status, error)

func (*Client) Scan

func (c *Client) Scan(ctx context.Context, funcs ...ScanOptionFunc) ([]*Player, error)

func (*Client) Status

func (c *Client) Status(ctx context.Context, addr string) (*Status, error)

type HTTPOptionFunc

type HTTPOptionFunc func(opts *HTTPOptions)

type HTTPOptions

type HTTPOptions struct {
	Headers http.Header
}

func NewHTTPOptions

func NewHTTPOptions(funcs ...HTTPOptionFunc) *HTTPOptions

type Player

type Player struct {
	ID   string
	IPs  []net.IP
	Port int
}

type ScanOptionFunc

type ScanOptionFunc func(opts *ScanOptions)

func WithPlayerIDs

func WithPlayerIDs(ids ...string) ScanOptionFunc

type ScanOptions

type ScanOptions struct {
	PlayerIDs []string
}

func NewScanOptions

func NewScanOptions(funcs ...ScanOptionFunc) *ScanOptions

type Status

type Status = server.StatusResponse

Jump to

Keyboard shortcuts

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