daemon

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2025 License: GPL-3.0 Imports: 11 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
}

Client represents a gRPC client for communicating with the Spage daemon

func NewClient

func NewClient(cfg *Config) (*Client, error)

NewClient creates a new gRPC client for daemon communication

func (*Client) Close

func (c *Client) Close() error

Close closes the client and cleans up resources

func (*Client) CloseStreamsGracefully

func (c *Client) CloseStreamsGracefully() error

CloseStreamsGracefully closes the streams gracefully, waiting for any pending data

func (*Client) Connect

func (c *Client) Connect() error

Connect establishes a connection to the daemon

func (*Client) Disconnect

func (c *Client) Disconnect() error

Disconnect closes the connection to the daemon

func (*Client) IsConnected

func (c *Client) IsConnected() bool

IsConnected returns whether the client is connected to the daemon

func (*Client) RegisterPlayCompletion

func (c *Client) RegisterPlayCompletion() error

func (*Client) RegisterPlayError

func (c *Client) RegisterPlayError(err error) error

RegisterPlayError registers a play error with the daemon via streaming

func (*Client) RegisterPlayStart

func (c *Client) RegisterPlayStart(playbook, inventory string, variables map[string]string, executor string) error

RegisterPlayStart registers the current play with the daemon via streaming

func (*Client) UpdateTaskResult

func (c *Client) UpdateTaskResult(taskResult *core.TaskResult) error

UpdateTaskResult sends a task result update to the daemon

func (*Client) WaitForStreamsToFinish

func (c *Client) WaitForStreamsToFinish(timeout time.Duration) error

WaitForStreamsToFinish waits for streams to finish processing any pending data

type Config

type Config struct {
	Endpoint string
	PlayID   string
	Timeout  time.Duration
}

Config holds the client configuration

Jump to

Keyboard shortcuts

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