Documentation
¶
Index ¶
- type APIError
- type Client
- func (c *Client) CreateAgent(ctx context.Context, source fs.FS, secrets []*lkproto.AgentSecret, ...) (*lkproto.CreateAgentResponse, error)
- func (c *Client) DeployAgent(ctx context.Context, agentID string, source fs.FS, ...) error
- func (c *Client) StreamLogs(ctx context.Context, logType, agentID string, writer io.Writer, ...) error
- type ClientOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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.
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 WithJsonLogStream ¶ added in v2.12.4
func WithJsonLogStream() 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.
Click to show internal directories.
Click to hide internal directories.