broker

package
v0.0.0-...-2eec6a9 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2017 License: LGPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package broker proxies requests from client, and routes to target nodes.

Index

Constants

View Source
const HTTPPathPrefix = "/"

Variables

This section is empty.

Functions

func NewHTTPHandler

func NewHTTPHandler(broker *Broker) http.Handler

Types

type Broker

type Broker struct {
	// contains filtered or unexported fields
}

Broker broker is entry to access solidb

func New

func New(store kv.Store, specMgr *specmgr.SpecManager) *Broker

New create an broker instance

func (*Broker) GetBlob

func (b *Broker) GetBlob(ctx context.Context, key blob.Key) (*blobio.OptBlob, error)

GetBlob get blob by its key

func (*Broker) PutBlob

func (b *Broker) PutBlob(ctx context.Context, blob *blob.Blob) error

PutBlob store a blob

func (*Broker) Shutdown

func (b *Broker) Shutdown()

Shutdown stop all goroutines and wait for stopped

Jump to

Keyboard shortcuts

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