diragent

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package diragent implements the client part of the directory agent protocol. It handles connecting to the server via websocket, authentication, and relaying messages from the server to a child process (implemented by RunWorker) and back.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunWorker

func RunWorker(ctx context.Context, provider directory.Provider) error

RunWorker implements the worker process for a directory agent. It handles accepting and processing requests from the server. It returns when ctx is canceled.

Types

type Service

type Service struct {
	Server     string
	AuthToken  string
	DirID      string
	Command    string
	Env        map[string]string
	Stderr     io.Writer
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

Service runs the parent process for the directory agent. It connects to the server and relays messages between the server (via websocket) and the child process (via stdin/stdout).

func (*Service) Run

func (s *Service) Run(ctx context.Context) error

Run runs the directory agent service. It connects to the server and relays messages. If the connection fails, it retries. It returns when the parent ctx is closed.

Jump to

Keyboard shortcuts

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