tstore

package
v0.9.13 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

README

TableStore

  • 封装connect
  • 增加日志和指标采集

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name string
	// Debug 开关
	Debug bool `toml:"debug" json:"debug"`
	// 指标采集开关
	EnableMetric bool `toml:"enableMetric" json:"enableMetric"`
	// 连接端点
	EndPoint string `toml:"endPoint" json:"endPoint"`
	// 实例
	Instance string `toml:"instance" json:"instance"`
	// accessKeyId
	AccessKeyId string `toml:"accessKeyId" json:"accessKeyId"`
	// accessKeySecret
	AccessKeySecret string `toml:"accessKeySecret" json:"accessKeySecret"`
	// 安全密钥
	SecurityToken string `toml:"securityToken" json:"securityToken"`
	// 重试次数
	RetryTimes uint `toml:"retryTimes" json:"retryTimes"`
	// 慢日志阈值
	SlowThreshold time.Duration `toml:"slowThreshold" json:"slowThreshold"`
	// 最大重试时间
	MaxRetryTime time.Duration `toml:"maxRetryTime" json:"maxRetryTime"`
	// 连接超时时间
	ConnectionTimeout time.Duration `toml:"connectionTimeout" json:"connectionTimeout"`
	// 请求超时时间
	RequestTimeout time.Duration `toml:"requestTimeout" json:"requestTimeout"`
	// 最大空闲连接数
	MaxIdleConnections int `toml:"maxIdleConnections" json:"maxIdleConnections"`
	// 访问日志开关
	EnableAccessLog bool `toml:"enableAccessLog" json:"enableAccessLog"`
}

Config ...

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig 返回默认配置

func RawConfig

func RawConfig(key string) *Config

RawConfig jupiter.tablestore.demo

func StdConfig

func StdConfig(name string) *Config

StdConfig 返回标准配置

func (*Config) MustBuild

func (config *Config) MustBuild() *tablestore.TableStoreClient

func (*Config) MustSingleton

func (config *Config) MustSingleton() *tablestore.TableStoreClient

type TsRoundTripper

type TsRoundTripper struct {
	http.Transport
	// contains filtered or unexported fields
}

func (*TsRoundTripper) RoundTrip

func (h *TsRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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