util

package
v0.1.72 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 12 Imported by: 3

Documentation

Index

Constants

View Source
const ENDPOINT_REGEX_PATTERN = `^(?:http[s]?:\/\/)?([a-z-0-9]+)\.(?:sls|log)\.aliyuncs\.com$`

Variables

This section is empty.

Functions

func ParseRegion added in v0.1.71

func ParseRegion(endpoint string) (string, error)

Types

type AKInfo

type AKInfo struct {
	AccessKeyId     string `json:"access.key.id"`
	AccessKeySecret string `json:"access.key.secret"`
	SecurityToken   string `json:"security.token"`
	Expiration      string `json:"expiration"`
	Keyring         string `json:"keyring"`
}

AKInfo ...

type SecurityTokenResult

type SecurityTokenResult struct {
	AccessKeyId     string
	AccessKeySecret string
	Expiration      string
	SecurityToken   string
	Code            string
	LastUpdated     string
}

SecurityTokenResult ...

type UpdateTokenFunction added in v0.1.71

type UpdateTokenFunction = func() (accessKeyID, accessKeySecret, securityToken string, expireTime time.Time, err error)

func NewTokenUpdateFunc

func NewTokenUpdateFunc(role string, configFilePath string) (tokenUpdateFunc UpdateTokenFunction, shutdown chan struct{})

NewTokenUpdateFunc create a token update function for ACK or ECS

Jump to

Keyboard shortcuts

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