Documentation
¶
Index ¶
- func SetLogger(logger *zap.Logger)
- func SetMyLogger(logger internal.ILogger)
- type Client
- type ClientShell
- type Result
- func (r *Result) GetBool() bool
- func (r *Result) GetDouble() float64
- func (r *Result) GetEdge() graph.Edge
- func (r *Result) GetFloat() float32
- func (r *Result) GetInt32() int32
- func (r *Result) GetInt64() int64
- func (r *Result) GetInt8() int8
- func (r *Result) GetList() []interface{}
- func (r *Result) GetMap() map[interface{}]interface{}
- func (r *Result) GetObject() interface{}
- func (r *Result) GetPath() *graph.DetachedPath
- func (r *Result) GetProperty() graph.Property
- func (r *Result) GetString() string
- func (r *Result) GetVertex() graph.Vertex
- func (r *Result) GetVertexProperty() graph.VertexProperty
- func (r *Result) SetValue(value interface{})
- type ResultSetFuture
- type SessionClient
- type SetLogContext
- type Settings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetMyLogger ¶
Types ¶
type Client ¶
type Client interface {
ClientShell
SetLogContext
Close()
}
session-less client support submit in sync or async, all in auto-transaction
type ClientShell ¶
type ClientShell interface {
SubmitScript(gremlin string) ([]Result, error)
SubmitScriptBound(gremlin string, bindings map[string]interface{}) ([]Result, error)
SubmitScriptOptions(gremlin string, options *graph.RequestOptions) ([]Result, error)
SubmitScriptAsync(gremlin string) (ResultSetFuture, error)
SubmitScriptBoundAsync(gremlin string, bindings map[string]interface{}) (ResultSetFuture, error)
SubmitScriptOptionsAsync(gremlin string, options *graph.RequestOptions) (ResultSetFuture, error)
}
client shell for submit serial API
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
func (*Result) GetPath ¶
func (r *Result) GetPath() *graph.DetachedPath
func (*Result) GetProperty ¶
func (*Result) GetVertexProperty ¶
func (r *Result) GetVertexProperty() graph.VertexProperty
type ResultSetFuture ¶
type ResultSetFuture interface {
IsCompleted() bool
GetResults() ([]Result, error)
GetResultsOrTimeout(timeout time.Duration) ([]Result, bool, error)
}
func NewResultSetFuture ¶
func NewResultSetFuture(future *graphsonv3.ResponseFuture) ResultSetFuture
type SessionClient ¶
type SessionClient interface {
BatchSubmit(func(ClientShell) error) error
SetLogContext
Close()
}
session client support batch submit
func NewSessionClient ¶
func NewSessionClient(sessionId string, settings *Settings) SessionClient
type SetLogContext ¶
type Settings ¶
type Settings struct {
// port of GDB to connect, default is 8182
Port int
// host that the driver will connect to, default is 'localhost'
Host string
// username and password for GDB auth
Username, Password string
// serializer for the driver of request to GDB and response from
Serializer string
// manageTransaction by user client or not in session
IsManageTransaction bool
// maximum number of socket connections, Default is 8
PoolSize int
// Amount of time client waits for connection if all connections
// are busy before returning an error.
// Default is ReadTimeout + 1 second.
PoolTimeout time.Duration
// Frequency of WebSocket ping checks, Default is 1 minute
PingInterval time.Duration
// max concurrent request pending on one connection, Default is 4
MaxConcurrentRequest int
// Amount of time client waits connection io write before returning an error.
// Default is 5 second
WriteTimeout time.Duration
// Amount of time client waits connection io read before returning an error.
// Default is the same with WriteTimeout
ReadTimeout time.Duration
// Interval of time to check connection health status in pool, new connection will be
// created if someone broken in pool
// Default is 1min, set minus value will disable it
AliveCheckInterval time.Duration
// deprecated
MinIdleConns int
// deprecated
IdleTimeout time.Duration
// deprecated
IdleCheckFrequency time.Duration
// deprecated
MaxConnAge time.Duration
}
Click to show internal directories.
Click to hide internal directories.