Documentation
¶
Index ¶
- type CertificateManager
- type CommandLine
- type CommandLineConfig
- type HttpClient
- type HttpClientCreator
- func (h *HttpClientCreator) Ping() error
- func (h *HttpClientCreator) Query(ctx context.Context, query *opengemini.Query) (*opengemini.QueryResult, error)
- func (h *HttpClientCreator) SetAuth(username, password string)
- func (h *HttpClientCreator) SetDebug(debug bool)
- func (h *HttpClientCreator) Write(ctx context.Context, database, retentionPolicy, raw, precision string) error
- type LineProtocolParser
- type LineProtocolState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertificateManager ¶
type CertificateManager struct {
CAContent []byte
CAPool *x509.CertPool
Certificate tls.Certificate
}
func NewCertificateManager ¶
func NewCertificateManager(ca, certificate, certificateKey string) (*CertificateManager, error)
type CommandLine ¶
type CommandLine struct {
*CommandLineConfig
// contains filtered or unexported fields
}
func NewCommandLine ¶
func NewCommandLine(cfg *CommandLineConfig) *CommandLine
func (*CommandLine) Run ¶
func (cl *CommandLine) Run()
type CommandLineConfig ¶
type CommandLineConfig struct {
Host string
Port int
UnixSocket string
Username string
Password string
Database string
RetentionPolicy string
Measurement string
Timeout int
EnableTls bool
InsecureTls bool
CACert string
Cert string
CertKey string
InsecureHostname bool
Precision string
TimeMultiplier int64
DisplayVertical bool
}
type HttpClient ¶
type HttpClient interface {
SetDebug(debug bool)
SetAuth(username, password string)
Ping() error
Query(context.Context, *opengemini.Query) (*opengemini.QueryResult, error)
Write(ctx context.Context, database, retentionPolicy, raw, precision string) error
}
func NewHttpClient ¶
func NewHttpClient(cfg *CommandLineConfig) (HttpClient, error)
type HttpClientCreator ¶
type HttpClientCreator struct {
HostPort string
// contains filtered or unexported fields
}
func (*HttpClientCreator) Ping ¶
func (h *HttpClientCreator) Ping() error
Ping will check to see if the server is up
func (*HttpClientCreator) Query ¶
func (h *HttpClientCreator) Query(ctx context.Context, query *opengemini.Query) (*opengemini.QueryResult, error)
func (*HttpClientCreator) SetAuth ¶
func (h *HttpClientCreator) SetAuth(username, password string)
func (*HttpClientCreator) SetDebug ¶
func (h *HttpClientCreator) SetDebug(debug bool)
type LineProtocolParser ¶
type LineProtocolParser struct {
// contains filtered or unexported fields
}
func NewLineProtocolParser ¶
func NewLineProtocolParser(raw string) *LineProtocolParser
func (*LineProtocolParser) Parse ¶
func (p *LineProtocolParser) Parse(timeMultiplier int64) ([]*opengemini.Point, error)
type LineProtocolState ¶
type LineProtocolState int
LineProtocolState define line protocol parser fsm state
const ( Measurement LineProtocolState = iota TagKey TagValue FieldKey FieldValue Timestamp )
Click to show internal directories.
Click to hide internal directories.