Documentation
¶
Index ¶
- func ValidateOption(option *GraphOption) error
- type CSVReader
- type CSVWriter
- type CsvOption
- type Data
- type GraphOption
- type IClient
- type IClientPool
- type ICsvReader
- type IGraphClient
- type IGraphClientPool
- type IGraphResponse
- type OutputOption
- type PoolOption
- type PoolPolicy
- type RetryOption
- type SSLOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateOption ¶ added in v1.1.2
func ValidateOption(option *GraphOption) error
Types ¶
type CSVReader ¶
type CSVReader struct { Path string Delimiter string WithHeader bool // contains filtered or unexported fields }
func NewCsvReader ¶
func (*CSVReader) ReadForever ¶
ReadForever read the csv in slice first, and send to the data channel forever.
type GraphOption ¶ added in v1.1.2
type GraphOption struct { PoolOption `json:",inline"` OutputOption `json:",inline"` CsvOption `json:",inline"` RetryOption `json:",inline"` SSLOption `json:",inline"` }
func MakeDefaultOption ¶ added in v1.1.2
func MakeDefaultOption(opt *GraphOption) *GraphOption
type ICsvReader ¶ added in v1.1.0
type IGraphClient ¶
type IGraphClient interface { IClient GetData() (Data, error) Execute(stmt string) (IGraphResponse, error) }
IGraphClient graph client
type IGraphClientPool ¶
type IGraphClientPool interface { IClientPool GetSession() (IGraphClient, error) // Init initialize the poop with default channel bufferSize Init() (IGraphClientPool, error) SetOption(*GraphOption) error }
IGraphClientPool graph client pool.
type IGraphResponse ¶
type IGraphResponse interface { IsSucceed() bool GetLatency() int64 GetResponseTime() int32 GetRowSize() int32 }
IGraphResponse graph response, just support some functions to user.
type OutputOption ¶ added in v1.1.2
type PoolOption ¶ added in v1.1.2
type PoolOption struct { PoolPolicy string `json:"pool_policy"` Address string `json:"address"` TimeoutUs int `json:"timeout_us"` IdleTimeUs int `json:"idletime_us"` MaxSize int `json:"max_size"` MinSize int `json:"min_size"` Username string `json:"username"` Password string `json:"password"` Space string `json:"space"` UseHttp bool `json:"use_http"` }
type PoolPolicy ¶ added in v1.1.2
type PoolPolicy string
pool policy
const ( ConnectionPool PoolPolicy = "connection" SessionPool PoolPolicy = "session" )
type RetryOption ¶ added in v1.1.2
Click to show internal directories.
Click to hide internal directories.