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

WireguardControl.ts overview

Wireguard control mechanisms.

Since v1.0.0


Exports Grouped by Category


Constructors

makeBundledWgQuickLayer

Signature

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

Source

Since v1.0.0

makeUserspaceLayer

Signature

declare const makeUserspaceLayer: () => WireguardControl

Source

Since v1.0.0

Layers

BundledWgQuickLayer

Signature

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

Source

Since v1.0.0

UserspaceLayer

Signature

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

Source

Since v1.0.0

Models

WireguardControl (interface)

Signature

export interface WireguardControl {
  readonly [TypeId]: TypeId

  readonly up: (
    wireguardConfig: WireguardConfig.WireguardConfig,
    wireguardInterface: WireguardInterface.WireguardInterface
  ) => Effect.Effect<
    WireguardInterface.WireguardInterface,
    | Socket.SocketError
    | Schema.SchemaError
    | PlatformError.SystemError
    | PlatformError.BadArgument
    | PlatformError.PlatformError
    | Cause.TimeoutError,
    FileSystem.FileSystem | Path.Path | ChildProcessSpawner.ChildProcessSpawner
  >

  readonly down: (
    wireguardConfig: WireguardConfig.WireguardConfig,
    wireguardInterface: WireguardInterface.WireguardInterface,
    wireguardGoProcess?: ChildProcessSpawner.ChildProcessHandle
  ) => Effect.Effect<
    WireguardInterface.WireguardInterface,
    | PlatformError.BadArgument
    | PlatformError.SystemError
    | PlatformError.PlatformError
    | Schema.SchemaError
    | Cause.TimeoutError,
    FileSystem.FileSystem | Path.Path | ChildProcessSpawner.ChildProcessSpawner
  >

  readonly upScoped: (
    wireguardConfig: WireguardConfig.WireguardConfig,
    wireguardInterface: WireguardInterface.WireguardInterface
  ) => Effect.Effect<
    WireguardInterface.WireguardInterface,
    | Socket.SocketError
    | Schema.SchemaError
    | PlatformError.SystemError
    | PlatformError.BadArgument
    | PlatformError.PlatformError
    | Cause.TimeoutError,
    FileSystem.FileSystem | Path.Path | Scope.Scope | ChildProcessSpawner.ChildProcessSpawner
  >
}

Source

Since v1.0.0

Tags

WireguardControl

Signature

declare const WireguardControl: Context.Service<WireguardControl, WireguardControl>

Source

Since v1.0.0

Type ids

TypeId

Signature

declare const TypeId: unique symbol

Source

Since v1.0.0

TypeId (type alias)

Signature

type TypeId = typeof TypeId

Source

Since v1.0.0