client

package
v0.0.0-...-54b3f6d Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Unknown = iota
	Param
	Params
	Sleep
)

Console side commands

View Source
const (
	SessionExpiredDuration int64 = 3600
)

Variables

View Source
var (
	ConnectionClosedError = errors.New("an existing connection was forcibly closed, please check your network")
	SessionLostError      = errors.New("the connection session was lost, please connect again")
	ClientNotExistedError = errors.New("get client error: client not existed, session expired")
)

Functions

func ClearClients

func ClearClients()

func CloseClient

func CloseClient(nsid string)

func ListParams

func ListParams(args string, tmpParameter ParameterMap, sessionMap ParameterMap) (err error)

Types

type Account

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

type Any

type Any interface{}

type ChannelRequest

type ChannelRequest struct {
	Gqls            []string
	ResponseChannel chan ChannelResponse
	Space           string
}

type ChannelResponse

type ChannelResponse struct {
	Results []SingleResponse
	Msg     interface{}
	Error   error
}

type Client

type Client struct {
	RequestChannel chan ChannelRequest
	CloseChannel   chan bool
	// contains filtered or unexported fields
}

func GetClient

func GetClient(nsid string) (*Client, error)

type ClientInfo

type ClientInfo struct {
	ClientID string
}

func NewClient

func NewClient(address string, port int, username string, password string, conf nebula.PoolConfig) (*ClientInfo, error)

type ExecuteResult

type ExecuteResult struct {
	Gql    string
	Result ParsedResult
	Error  error
}

func Execute

func Execute(nsid string, space string, gqls []string) ([]ExecuteResult, error)

type ParameterList

type ParameterList []string

type ParameterMap

type ParameterMap map[string]interface{}

type ParsedResult

type ParsedResult struct {
	Headers     []string         `json:"headers"`
	Tables      []map[string]Any `json:"tables"`
	TimeCost    int64            `json:"timeCost"`
	LocalParams ParameterMap     `json:"localParams"`
	Space       string           `json:"space"`
}

type SessionPool

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

type SingleResponse

type SingleResponse struct {
	Gql    string
	Result *nebula.ResultSet
	Params ParameterMap
	Msg    interface{}
	Error  error
}

Jump to

Keyboard shortcuts

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