core

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

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)

func (*CertificateManager) CreateTls

func (cm *CertificateManager) CreateTls(insecureTls, insecureHostname bool) *tls.Config

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 (*HttpClientCreator) SetAuth

func (h *HttpClientCreator) SetAuth(username, password string)

func (*HttpClientCreator) SetDebug

func (h *HttpClientCreator) SetDebug(debug bool)

func (*HttpClientCreator) Write

func (h *HttpClientCreator) Write(ctx context.Context, database, retentionPolicy, raw, precision string) error

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
)

Jump to

Keyboard shortcuts

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