boundarylogproxy

package
v2.31.6 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package boundarylogproxy provides a Unix socket server that receives boundary audit logs and forwards them to coderd via the agent API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultSocketPath

func DefaultSocketPath() string

DefaultSocketPath returns the default path for the boundary audit log socket.

Types

type Reporter

type Reporter interface {
	ReportBoundaryLogs(ctx context.Context, req *agentproto.ReportBoundaryLogsRequest) (*agentproto.ReportBoundaryLogsResponse, error)
}

Reporter reports boundary logs from workspaces.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server listens on a Unix socket for boundary log messages and buffers them for forwarding to coderd. The socket server and the forwarder are decoupled: - Start() creates the socket and accepts a connection from boundary - RunForwarder() drains the buffer and sends logs to coderd via AgentAPI

func NewServer

func NewServer(logger slog.Logger, socketPath string) *Server

NewServer creates a new boundary log proxy server.

func (*Server) Close

func (s *Server) Close() error

Close stops the server and blocks until resources have been cleaned up. It must be called after Start.

func (*Server) RunForwarder

func (s *Server) RunForwarder(ctx context.Context, sender Reporter) error

RunForwarder drains the log buffer and forwards logs to coderd. It blocks until ctx is canceled.

func (*Server) Start

func (s *Server) Start() error

Start begins listening for connections on the Unix socket, and handles new connections in a separate goroutine. Incoming logs from connections are buffered until RunForwarder drains them.

Directories

Path Synopsis
Package codec implements the wire format for agent <-> boundary communication.
Package codec implements the wire format for agent <-> boundary communication.

Jump to

Keyboard shortcuts

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