Documentation ¶
Overview ¶
Package gremlin provides access to a Gremlin server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTimeout = errors.New("timeout error")
ErrTimeout is returned when a Gremlin query times out.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Endpoint is the Gremlin Endpoint. Endpoint string // AuthMode is the authentication mode. Valid values: "plain", // "neptune_iam". AuthMode string // AWSRegion is the AWS region in case of using Neptune. AWSRegion string // RetryLimit is the number of retries before returning error. RetryLimit int // RetryDuration is the time to wait between retries. RetryDuration time.Duration }
Config contains the configuration parameters needed to interact with a Gremlin server.
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
A Connection handles the connection with the Gremlin server. This includes authentication, reconnections and retries.
func NewConnection ¶
func NewConnection(cfg Config) (Connection, error)
NewConnection creates a Connection with the provided configuration.
type QueryFunc ¶
type QueryFunc func(*gremlingo.GraphTraversalSource) ([]*gremlingo.Result, error)
QueryFunc represents a Gremlin query in the context of a Connection. It is executed by [Connectino.Query].
Click to show internal directories.
Click to hide internal directories.