ws

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

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 Conn's 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