localipc

package
v0.1.0-preview.7 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package localipc opens explicitly addressed, current-user-only local IPC connections. It performs no endpoint discovery, PATH lookup, network fallback, authentication, or daemon startup.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnsafeEndpoint reports an address whose type, ownership, permissions,
	// or platform-specific spelling is not safe for current-user IPC.
	ErrUnsafeEndpoint = errors.New("local IPC endpoint is unsafe")
	// ErrEndpointInUse reports an existing live Unix-domain listener detected
	// while safely distinguishing a stale socket. Listen never removes an
	// endpoint that responds to a connection probe.
	ErrEndpointInUse = errors.New("local IPC endpoint is already in use")
)

Functions

func Dial

func Dial(ctx context.Context, address string) (net.Conn, error)

Dial connects only to an explicitly addressed private Unix socket and honors caller cancellation and deadlines.

func Listen

func Listen(address string) (net.Listener, error)

Listen creates a Unix-domain stream listener at the exact absolute address. Its existing, symlink-free parent directory must be owned by the effective user and grant no group or other access; every ancestor must have a trusted owner and safe write semantics. An owned private stale socket is removed only after a failed active-listener probe; every other existing node is preserved.

Types

This section is empty.

Jump to

Keyboard shortcuts

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