client

package
v0.0.0-...-1a40e3f Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2023 License: Apache-2.0 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 {
	ServerURL string
}

Client is used to talk to the API server

func NewClient

func NewClient(serverURL string) *Client

NewClient initializes a new REST client to the API server

func (*Client) CreateEvent

func (c *Client) CreateEvent(event *models.Event) error

CreateEvent creates a new Event

func (*Client) ListEvents

func (c *Client) ListEvents() ([]*models.Event, error)

ListEvents lists all events

func (*Client) ListRules

func (c *Client) ListRules() ([]*models.Rule, error)

ListRules lists all rules

func (*Client) RegisterWorker

func (c *Client) RegisterWorker(worker *models.Worker) error

RegisterWorker creates a worker

func (*Client) ReportWorker

func (c *Client) ReportWorker(worker *models.Worker) error

ReportWorker sends a worker heartbeat

func (*Client) WatchEvents

func (c *Client) WatchEvents() <-chan models.Event

WatchEvents setup a HTTP channel to receive event stream

Jump to

Keyboard shortcuts

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