Share the canonical socket implementation with public Nix helpers (#503)

This commit is contained in:
Quixos Development Agent 01f26965-84fa-4a79-8069-725682c13065
2026-10-29 12:30:55 +00:00
parent 9797799e83
commit 97ce77d3de
2 changed files with 156 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
export type SocketOptions = { uid?: number; root?: string };
export const socketPathBytes: number;
export function checkedSocketPath(value: unknown): string;
export function socketDirectory(identity: unknown, options?: SocketOptions): string;
export function socketAddress(identity: unknown, role: string, options?: SocketOptions): string;
export function prepareSocketDirectory(identity: unknown, options?: SocketOptions): Promise<string>;
export function prepareSocketParent(socket: string): Promise<string>;
export function removeEmptySocketDirectory(identity: unknown, options?: SocketOptions): Promise<void>;