memblob

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2019 License: Apache-2.0 Imports: 13 Imported by: 92

Documentation

Overview

Package memblob provides an in-memory blob implementation. Use OpenBucket to construct a blob.Bucket.

Open URLs

For blob.Open URLs, memblob registers for the scheme "mem"; URLs start with "mem://".

The URL's Path and Host are ignored, and no query options are supported. Example:

  • mem://

As

memblob does not support any types for As.

Example
package main

import (
	"gocloud.dev/blob/memblob"
)

func main() {

	// Create an in-memory bucket.
	_ = memblob.OpenBucket(nil)

}
Example (Open)
package main

import (
	"context"
	"log"

	"gocloud.dev/blob"
)

func main() {
	_, err := blob.Open(context.Background(), "mem://")
	if err != nil {
		log.Fatal(err)
	}
}

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenBucket

func OpenBucket(opts *Options) *blob.Bucket

OpenBucket creates a *blob.Bucket backed by memory.

Types

type Options

type Options struct{}

Options sets options for constructing a *blob.Bucket backed by memory.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL