ws

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultDialer is a dialer with all fields set to the default values.
	DefaultDialer = &Dialer{
		Dialer: websocket.Dialer{
			Proxy:            http.ProxyFromEnvironment,
			HandshakeTimeout: 5 * time.Second,
			WriteBufferSize:  8192,
			ReadBufferSize:   8192,
		},
	}

	// ErrConnClosed is returned by the Conns Execute method when
	// the underlying gremlin server connection is closed.
	ErrConnClosed = errors.New("gremlin: server connection closed")

	// ErrDuplicateRequest is returned by the Conns Execute method on
	// request identifier key collision.
	ErrDuplicateRequest = errors.New("gremlin: duplicate request")
)

Functions

This section is empty.

Types

type Conn

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

Conn performs operations on a gremlin server.

func (*Conn) Close

func (c *Conn) Close() error

Close connection with a Gremlin server.

func (*Conn) Execute

func (c *Conn) Execute(ctx context.Context, req *gremlin.Request) (*gremlin.Response, error)

Execute executes a request against a Gremlin server.

type Dialer

type Dialer struct {
	// Underlying websocket dialer.
	websocket.Dialer
	// contains filtered or unexported fields
}

A Dialer contains options for connecting to Gremlin server.

func (*Dialer) Dial

func (d *Dialer) Dial(uri string) (*Conn, error)

Dial creates a new connection by calling DialContext with a background context.

func (*Dialer) DialContext

func (d *Dialer) DialContext(ctx context.Context, uri string) (*Conn, error)

DialContext creates a new Gremlin connection.

Jump to

Keyboard shortcuts

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