Skip to main content Link Search Menu Expand Document (external link)

WireguardControl overview

Wireguard control mechanisms.

Added in v1.0.0


Table of contents


Constructors

makeBundledWgQuickLayer

Signature

export declare const makeBundledWgQuickLayer: (options: { sudo: boolean }) => WireguardControlImpl

Added in v1.0.0

makeUserspaceLayer

Signature

export declare const makeUserspaceLayer: () => WireguardControlImpl

Added in v1.0.0

Layers

BundledWgQuickLayer

Signature

export declare const BundledWgQuickLayer: Layer.Layer<WireguardControl, never, never>

Added in v1.0.0

UserspaceLayer

Signature

export declare const UserspaceLayer: Layer.Layer<WireguardControl, never, never>

Added in v1.0.0

Models

WireguardControlImpl (interface)

Signature

export interface WireguardControlImpl {
  readonly up: (
    wireguardConfig: WireguardConfig.WireguardConfig,
    wireguardInterface: WireguardInterface.WireguardInterface
  ) => Effect.Effect<
    WireguardInterface.WireguardInterface,
    Socket.SocketError | ParseResult.ParseError | PlatformError.PlatformError | Cause.TimeoutException,
    FileSystem.FileSystem | Path.Path | CommandExecutor.CommandExecutor
  >

  readonly down: (
    wireguardConfig: WireguardConfig.WireguardConfig,
    wireguardInterface: WireguardInterface.WireguardInterface,
    wireguardGoProcess?: exec.ChildProcess
  ) => Effect.Effect<
    WireguardInterface.WireguardInterface,
    PlatformError.PlatformError | ParseResult.ParseError | Cause.TimeoutException,
    FileSystem.FileSystem | Path.Path | CommandExecutor.CommandExecutor
  >

  readonly upScoped: (
    wireguardConfig: WireguardConfig.WireguardConfig,
    wireguardInterface: WireguardInterface.WireguardInterface
  ) => Effect.Effect<
    WireguardInterface.WireguardInterface,
    Socket.SocketError | ParseResult.ParseError | PlatformError.PlatformError | Cause.TimeoutException,
    FileSystem.FileSystem | Path.Path | Scope.Scope | CommandExecutor.CommandExecutor
  >

  readonly getConfigRequestResolver: Resolver.RequestResolver<WireguardConfig.WireguardGetConfigRequest, never>
  readonly setConfigRequestResolver: Resolver.RequestResolver<WireguardConfig.WireguardSetConfigRequest, never>
}

Added in v1.0.0

Tags

WireguardControl

Signature

export declare const WireguardControl: Context.Tag<WireguardControl, WireguardControlImpl>

Added in v1.0.0

WireguardControl (interface)

Signature

export interface WireguardControl {
  readonly _: unique symbol
}

Added in v1.0.0