couchdb

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CouchDB

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

CouchDB represents a CouchDB instance.

func New

func New(internalURL, externalURL string) (*CouchDB, error)

New creates a new CouchDB instance.

func (*CouchDB) NewProxy

func (c *CouchDB) NewProxy(prefix string, port int) (*Proxy, error)

NewProxy creates a new proxy to CouchDB.

func (*CouchDB) URL

func (c *CouchDB) URL(internal bool) *url.URL

URL returns the URL of the CouchDB instance.

func (*CouchDB) WaitFor

func (c *CouchDB) WaitFor(timeout time.Duration) error

WaitFor waits for the CouchDB instance to start.

type Proxy

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

Proxy represents a proxy to CouchDB.

func (*Proxy) RoundTrip

func (p *Proxy) RoundTrip(req *http.Request) (resp *http.Response, err error)

RoundTrip handles a request to CouchDB.

func (*Proxy) Start

func (p *Proxy) Start() error

Start starts the proxy to CouchDB.

func (*Proxy) Stop

func (p *Proxy) Stop() error

Stop stops the proxy to CouchDB.

Jump to

Keyboard shortcuts

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