nebulagraph

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// AllInOne read csv sequentially
	AllInOne csvReaderStrategy = iota
	// Separate read csv concurrently
	Separate
)
View Source
const EnvRetryIntervalUs = "NEBULA_RETRY_INTERVAL_US"
View Source
const EnvRetryTimeoutUs = "NEBULA_RETRY_TIMEOUT_US"
View Source
const EnvRetryTimes = "NEBULA_RETRY_TIMES"

Variables

This section is empty.

Functions

This section is empty.

Types

type GraphClient

type GraphClient struct {
	Client *graph.Session
	Pool   *GraphPool
	DataCh chan common.Data
	// contains filtered or unexported fields
}

GraphClient a wrapper for nebula client, could read data from DataCh

func (*GraphClient) Close

func (gc *GraphClient) Close() error

func (*GraphClient) Execute

func (gc *GraphClient) Execute(stmt string) (common.IGraphResponse, error)

Execute executes nebula query

func (*GraphClient) GetData

func (gc *GraphClient) GetData() (common.Data, error)

GetData get data from csv reader

func (*GraphClient) Open

func (gc *GraphClient) Open() error

type GraphPool

type GraphPool struct {
	DataCh   chan common.Data
	OutputCh chan []string
	// contains filtered or unexported fields
}

GraphPool nebula connection pool

func NewNebulaGraph

func NewNebulaGraph() *GraphPool

NewNebulaGraph New for k6 initialization.

func (*GraphPool) Close

func (gp *GraphPool) Close() error

Close closes the nebula pool

func (*GraphPool) ConfigCsvStrategy

func (gp *GraphPool) ConfigCsvStrategy(strategy int)

Deprecated ConfigCsvStrategy sets csv reader strategy

func (*GraphPool) GetSession

func (gp *GraphPool) GetSession() (common.IGraphClient, error)

GetSession gets the session from pool

func (*GraphPool) Init

func (gp *GraphPool) Init() (common.IGraphClientPool, error)

Init initializes nebula pool with address and concurrent, by default the bufferSize is 20000

func (*GraphPool) SetOption added in v1.1.2

func (gp *GraphPool) SetOption(option *common.GraphOption) error

type K6Module added in v1.1.6

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

refer: https://k6.io/docs/extensions/get-started/create/javascript-extensions/#use-the-advanced-module-api K6Module is a module for k6, using the advanced module API

func NewModule added in v1.1.6

func NewModule() *K6Module

func (*K6Module) NewModuleInstance added in v1.1.6

func (m *K6Module) NewModuleInstance(vu modules.VU) modules.Instance

type K6NebulaInstance added in v1.1.6

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

func (*K6NebulaInstance) Exports added in v1.1.6

func (i *K6NebulaInstance) Exports() modules.Exports

type Response

type Response struct {
	*graph.ResultSet
	ResponseTime int32
}

Response a wrapper for nebula resultSet

func (*Response) GetLatency

func (r *Response) GetLatency() int64

GetLatency GetLatency

func (*Response) GetResponseTime

func (r *Response) GetResponseTime() int32

GetResponseTime GetResponseTime

func (*Response) GetRowSize

func (r *Response) GetRowSize() int32

GetRowSize GetRowSize

func (*Response) IsSucceed

func (r *Response) IsSucceed() bool

IsSucceed IsSucceed

Jump to

Keyboard shortcuts

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