Skip to content

EventLogRemote

23 exports Added in v1.0.0 Source

Change

Signature

declare class RemoteAdditions extends ReadonlySide<{
  readonly _tag: tag<"RemoveAdditions">;
  readonly entries: $Array<typeof RemoteEntry>;
}, "Type"> {
  constructor(...args: [props: {
    readonly _tag?: "RemoveAdditions";
    readonly entries: readonly Array<RemoteEntry>;
  }, options?: MakeOptions]);
}

Construtors

fromSocket

Added in v1.0.0 Source

Signature

declare function fromSocket(options?: { readonly disablePing?: boolean }): Effect<void, never, any>;

Signature

declare function fromWebSocket(
  url: string,
  options?: {
    readonly disablePing?: boolean;
  },
): Effect<void, never, any>;

Layers

Signature

declare function layerWebSocket(
  url: string,
  options?: {
    readonly disablePing?: boolean;
  },
): Layer<never, never, any>;

Signature

declare function layerWebSocketBrowser(
  url: string,
  options?: {
    readonly disablePing?: boolean;
  },
): Layer<never, never, EventLog>;

Models

EventLogRemote interface

Added in v1.0.0 Source

Signature

interface EventLogRemote {
  readonly changes: (identity: any, startSequence: number) => Effect<ReadonlyMailbox<RemoteEntry>, never, Scope>;
  readonly id: any;
  readonly write: (identity: any, entries: readonly Array<Entry>) => Effect<void>;
}

Protocol

Ack

Added in v1.0.0 Source

Signature

declare class Ack extends ReadonlySide<{
  readonly _tag: tag<"Ack">;
  readonly id: Number;
  readonly sequenceNumbers: $Array<Number>;
}, "Type"> {
  constructor(...args: [props: {
    readonly _tag?: "Ack";
    readonly id: number;
    readonly sequenceNumbers: readonly Array<number>;
  }, options?: MakeOptions]);
}

Changes

Added in v1.0.0 Source

Signature

declare class Changes extends ReadonlySide<{
  readonly _tag: tag<"Changes">;
  readonly entries: $Array<Struct<{
    readonly encryptedEntry: any;
    readonly entryId: any;
    readonly iv: any;
    readonly sequence: Number;
  }>>;
  readonly publicKey: String;
}, "Type"> {
  constructor(...args: [props: {
    readonly _tag?: "Changes";
    readonly entries: readonly Array<{
      [key: string]: any;
    }>;
    readonly publicKey: string;
  }, options?: MakeOptions]);
}

Signature

declare class ChunkedMessage extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
  static join(map: Map<number, {
    bytes: number;
    count: number;
    readonly parts: Array<Uint8Array<ArrayBufferLike>>;
  }>, part: ChunkedMessage): Uint8Array<ArrayBufferLike> | undefined;
  static split(id: number, data: Uint8Array): readonly Array<ChunkedMessage>;
}

Signature

declare const decodeRequest: (input: any, options?: ParseOptions) => any;

Signature

declare const decodeResponse: (input: any, options?: ParseOptions) => any;

Signature

declare const encodeRequest: (input: any, options?: ParseOptions) => any;

Signature

declare const encodeResponse: (input: any, options?: ParseOptions) => any;

Hello

Added in v1.0.0 Source

Signature

declare class Hello extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Ping

Added in v1.0.0 Source

Signature

declare class Ping extends ReadonlySide<
  {
    readonly _tag: tag<"Ping">;
    readonly id: Number;
  },
  "Type"
> {
  constructor(
    ...args: [
      props: {
        readonly _tag?: "Ping";
        readonly id: number;
      },
      options?: MakeOptions,
    ]
  );
}

Pong

Added in v1.0.0 Source

Signature

declare class Pong extends ReadonlySide<
  {
    readonly _tag: tag<"Pong">;
    readonly id: Number;
  },
  "Type"
> {
  constructor(
    ...args: [
      props: {
        readonly _tag?: "Pong";
        readonly id: number;
      },
      options?: MakeOptions,
    ]
  );
}

Signature

declare const ProtocolRequest: Union<readonly Array<Constraint>>

Signature

declare const ProtocolRequestMsgPack: any;

Signature

declare const ProtocolResponse: Union<readonly Array<Constraint>>

Signature

declare const ProtocolResponseMsgPack: any;

Signature

declare class RequestChanges extends ReadonlySide<
  {
    readonly _tag: tag<"RequestChanges">;
    readonly publicKey: String;
    readonly startSequence: Number;
  },
  "Type"
> {
  constructor(
    ...args: [
      props: {
        readonly _tag?: "RequestChanges";
        readonly publicKey: string;
        readonly startSequence: number;
      },
      options?: MakeOptions,
    ]
  );
}

StopChanges

Added in v1.0.0 Source

Signature

declare class StopChanges extends ReadonlySide<
  {
    readonly _tag: tag<"StopChanges">;
    readonly publicKey: String;
  },
  "Type"
> {
  constructor(
    ...args: [
      props: {
        readonly _tag?: "StopChanges";
        readonly publicKey: string;
      },
      options?: MakeOptions,
    ]
  );
}

WriteEntries

Added in v1.0.0 Source

Signature

declare class WriteEntries extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}