client

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DaemonConnectionStruct

type DaemonConnectionStruct struct {
	Connection net.Conn
	config.BobbitConfig
}

DaemonConnectionStruct holds the network connection and configuration for a Bobbit daemon client.

func New

New creates and returns a new DaemonConnectionStruct initialized with the provided BobbitConfig.

func (*DaemonConnectionStruct) BuildPayload

func (d *DaemonConnectionStruct) BuildPayload(p *payload.JobPayload, metadata any) (err error)

BuildPayload establishes a connection to the daemon's Unix socket and marshals the provided metadata into the JobPayload. It returns an error if the connection fails or metadata marshalling fails.

func (*DaemonConnectionStruct) GetPayload

func (d *DaemonConnectionStruct) GetPayload(target any) error

GetPayload decodes the response from the daemon connection into the provided target object. It returns an error if decoding fails.

func (*DaemonConnectionStruct) SendPayload

func (d *DaemonConnectionStruct) SendPayload(target any) error

SendPayload encodes and sends the given target object over the established daemon connection. It returns an error if encoding or writing fails.

type DaemonNotRunningError

type DaemonNotRunningError struct {
	NetError error
	Config   config.BobbitConfig
}

func (*DaemonNotRunningError) Error

func (d *DaemonNotRunningError) Error() string

Jump to

Keyboard shortcuts

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