Options
All
  • Public
  • Public/Protected
  • All
Menu

An adapter for Azure Storage Blobs.

Hierarchy

  • AzureBlobAdapter

Implements

  • Adapter

Index

Constructors

constructor

Properties

Readonly blobService

blobService: BlobServiceClient

The backing instance of blob service client.

Readonly containerCache

containerCache: Map<string, ContainerClient>

A cache of encountered container clients to optimize performance.

createIfNotExist

createIfNotExist: boolean

Whether to create a container if it does not yet exist.

flushEnabled

flushEnabled: boolean

Enable or disable flushing the file system.

handle

handle: "azure-blob"

The handle for this adapter, basically an id. Should be something simple but descriptive, like 'node-fs' or 'blob'.

Readonly include

include: Matcher

The file globs to apply to snapshot and flush operations.

journal

Log useful messages to the journal about file operations.

Readonly root

root: string

The real root of this file system which will be committed to.

Accessors

isGlobal

  • get isGlobal(): boolean

Methods

flush

  • flush(): Promise<void>

Private getContainer

  • getContainer(name: string, op: "snapshot" | "write" | "mkdir" | "link" | "remove" | "flush" | "read", exists?: boolean): Promise<ContainerClient>

link

  • link(linkPath: string, linkTarget: string, type: LinkType): Promise<void>

Private listContainers

  • listContainers(op: "snapshot" | "write" | "mkdir" | "link" | "remove" | "flush" | "read"): AsyncGenerator<[string, ContainerClient], any, unknown>
  • List the containers for this instance and optionally cache them.

    Parameters

    • op: "snapshot" | "write" | "mkdir" | "link" | "remove" | "flush" | "read"

    Returns AsyncGenerator<[string, ContainerClient], any, unknown>

mkdir

  • mkdir(path: string): Promise<void>

read

  • read(path: string): Promise<Buffer>

Private readBlob

  • readBlob(container: string | ContainerClient, blobName: string, op: "snapshot" | "write" | "mkdir" | "link" | "remove" | "flush" | "read"): Promise<Buffer>

remove

  • remove(path: string, type: ItemType): Promise<void>

snapshot

  • snapshot(): AsyncGenerator<[string, SnapshotEntry], any, unknown>
  • Snapshot of the underlying file system; an asynchronous iterable which returns an entry of path and data.

    Returns AsyncGenerator<[string, SnapshotEntry], any, unknown>

    The asynchronous iterable to get the snapshot.

write

  • write(path: string, contents?: Buffer): Promise<void>

Generated using TypeDoc