cloudagents

package
v2.12.3 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2025 License: Apache-2.0 Imports: 27 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Message string            `json:"msg"`
	Meta    map[string]string `json:"meta,omitempty"`
}

type Client

type Client struct {
	*lksdk.AgentClient
	// contains filtered or unexported fields
}

Client is a wrapper around the lksdk.AgentClient that provides a simpler interface for creating and deploying agents.

func New

func New(opts ...ClientOption) (*Client, error)

New returns a new Client with the given project URL, API key, and API secret.

func (*Client) CreateAgent

func (c *Client) CreateAgent(
	ctx context.Context,
	source fs.FS,
	secrets []*lkproto.AgentSecret,
	regions []string,
	excludeFiles []string,
	buildLogStreamWriter io.Writer,
) (*lkproto.CreateAgentResponse, error)

CreateAgent creates a new agent by building from source.

func (*Client) DeployAgent

func (c *Client) DeployAgent(
	ctx context.Context,
	agentID string,
	source fs.FS,
	secrets []*lkproto.AgentSecret,
	excludeFiles []string,
	buildLogStreamWriter io.Writer,
) error

DeployAgent deploys new agent by building from source.

func (*Client) StreamLogs

func (c *Client) StreamLogs(ctx context.Context, logType, agentID string, writer io.Writer, serverRegion string) error

StreamLogs streams the logs for the given agent.

type ClientOption

type ClientOption func(*Client)

ClientOption provides a way to configure the Client.

func WithHTTPClient

func WithHTTPClient(httpClient *http.Client) ClientOption

WithHTTPClient sets the http client for the Client.

func WithHeaders

func WithHeaders(headers map[string]string) ClientOption

func WithLogger

func WithLogger(logger logger.Logger) ClientOption

WithLogger sets the logger for the Client.

func WithProject

func WithProject(projectURL, apiKey, apiSecret string) ClientOption

WithProject sets the livekit project credentials for the Client.

Jump to

Keyboard shortcuts

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