storage

package
v0.0.0-...-342a630 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyEndpoint = errors.New("oss endpoint is empty")

Functions

func NewInfluxdbClient

func NewInfluxdbClient(serverURL, authToken string) influxdb2.Client

func ParseAWSURLRegion

func ParseAWSURLRegion(s string) string

func ParseEndpointRegion

func ParseEndpointRegion(s string) string

Types

type AzureReplayStorage

type AzureReplayStorage struct {
	AccountName    string
	AccountKey     string
	ContainerName  string
	EndpointSuffix string
}

func (AzureReplayStorage) TypeName

func (a AzureReplayStorage) TypeName() string

func (AzureReplayStorage) Upload

func (a AzureReplayStorage) Upload(gZipFilePath, target string) (err error)

type CommandStorage

type CommandStorage interface {
	BulkSave(commands []*model.Command) error
	TypeName() string
}

func NewCommandStorage

func NewCommandStorage(jmsService *service.JMService, conf *model.TerminalConfig) CommandStorage

type ESCommandStorage

type ESCommandStorage struct {
	Hosts   []string
	Index   string
	DocType string

	IsDataStream       bool
	InsecureSkipVerify bool
}

func (ESCommandStorage) BulkSave

func (es ESCommandStorage) BulkSave(commands []*model.Command) error

func (ESCommandStorage) BulkSaveEs

func (es ESCommandStorage) BulkSaveEs(commands []*model.Command) error

func (ESCommandStorage) BulkSaveEs8

func (es ESCommandStorage) BulkSaveEs8(commands []*model.Command) (err error)

func (ESCommandStorage) IsEs8

func (es ESCommandStorage) IsEs8() bool

func (ESCommandStorage) TypeName

func (es ESCommandStorage) TypeName() string

type FTPFileStorage

type FTPFileStorage interface {
	Storage
}

func NewFTPFileStorage

func NewFTPFileStorage(jmsService *service.JMService, cfg model.ReplayConfig) FTPFileStorage

type FTPServerStorage

type FTPServerStorage struct {
	StorageType string
	JmsService  *service.JMService
}

func (FTPServerStorage) TypeName

func (s FTPServerStorage) TypeName() string

func (FTPServerStorage) Upload

func (s FTPServerStorage) Upload(filePath, target string) (err error)

type InfluxdbStorage

type InfluxdbStorage struct {
	ServerURL   string
	AuthToken   string
	Bucket      string
	Measurement string
}

func (InfluxdbStorage) BulkSave

func (influx InfluxdbStorage) BulkSave(commands []*model.Command) (err error)

func (InfluxdbStorage) TypeName

func (influx InfluxdbStorage) TypeName() string

type InfoResponse

type InfoResponse struct {
	Version Version `json:"version"`
}

type NullStorage

type NullStorage struct {
}

func NewNullStorage

func NewNullStorage() (storage NullStorage)

func (NullStorage) BulkSave

func (f NullStorage) BulkSave(commands []*model.Command) (err error)

func (NullStorage) TypeName

func (f NullStorage) TypeName() string

func (NullStorage) Upload

func (f NullStorage) Upload(gZipFile, target string) (err error)

type OBSReplayStorage

type OBSReplayStorage struct {
	Endpoint  string
	Bucket    string
	AccessKey string
	SecretKey string
}

func (OBSReplayStorage) TypeName

func (o OBSReplayStorage) TypeName() string

func (OBSReplayStorage) Upload

func (o OBSReplayStorage) Upload(gZipFilePath, target string) (err error)

type OSSReplayStorage

type OSSReplayStorage struct {
	Endpoint  string
	Bucket    string
	AccessKey string
	SecretKey string
}

func (OSSReplayStorage) TypeName

func (o OSSReplayStorage) TypeName() string

func (OSSReplayStorage) Upload

func (o OSSReplayStorage) Upload(gZipFilePath, target string) (err error)

type ReplayStorage

type ReplayStorage interface {
	Storage
}

func NewReplayStorage

func NewReplayStorage(jmsService *service.JMService, cfg model.ReplayConfig) ReplayStorage

type S3ReplayStorage

type S3ReplayStorage struct {
	Bucket    string
	Region    string
	AccessKey string
	SecretKey string
	Endpoint  string
}

func (S3ReplayStorage) TypeName

func (s S3ReplayStorage) TypeName() string

func (S3ReplayStorage) Upload

func (s S3ReplayStorage) Upload(gZipFilePath, target string) (err error)

type ServerStorage

type ServerStorage struct {
	StorageType string
	JmsService  *service.JMService
}

func (ServerStorage) BulkSave

func (s ServerStorage) BulkSave(commands []*model.Command) (err error)

func (ServerStorage) TypeName

func (s ServerStorage) TypeName() string

func (ServerStorage) Upload

func (s ServerStorage) Upload(gZipFilePath, target string) (err error)

type Storage

type Storage interface {
	Upload(gZipFile, target string) error
	TypeName() string
}

func GetStorage

func GetStorage(cfg model.ReplayConfig) Storage

type Version

type Version struct {
	BuildDate string `json:"build_date"`
	Number    string `json:"number"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳