client

package
v0.0.0-alpha1 Latest Latest
Warning

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

Go to latest
Published: May 17, 2026 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package client is the side of the daemon protocol that runs inside the short-lived `hpcc wrap` / symlink invocation. It lives in its own package so the runner can import it without pulling in the daemon server (which itself imports runner — putting the client in the daemon package would form a cycle).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigPath

func ConfigPath() string

func Dispatch

func Dispatch(cfg *Config, cwd string, args []string) (*gen.CompileResponse, error)

Dispatch sends a single CompileRequest to the daemon and reads back the response. Length-prefixed protobuf, matching the framing in daemon.handleConnection. The connection opens with an auth handshake: we send the token from the on-disk config, the server validates it and either continues or hard-closes.

Types

type Config

type Config struct {
	Pid       int
	Port      int
	AuthToken string
}

func Load

func Load() *Config

Load returns the daemon config if a daemon process is alive, or nil otherwise. A missing/unparseable config file or a dead PID all collapse into the same nil result — the caller falls back to local execution.

Jump to

Keyboard shortcuts

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