cache_stnsd

package
v0.3.19 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetExpirationCallback added in v0.3.8

func SetExpirationCallback(client *libstns.STNS, cache *ttlcache.Cache)

Types

type Cached added in v0.3.0

type Cached struct {
	Prefetch   bool   `toml:"prefetch"`
	UnixSocket string `toml:"unix_socket"`
}

type Config

type Config struct {
	ApiEndpoint      string            `toml:"api_endpoint"`
	AuthToken        string            `toml:"auth_token"`
	User             string            `toml:"user"`
	Password         string            `toml:"password"`
	SSLVerify        bool              `toml:"ssl_verify"`
	HttpProxy        string            `toml:"http_proxy"`
	HttpKeepalive    bool              `toml:"http_keepalive"`
	RequestTimeout   int               `toml:"request_timeout"`
	RequestRetry     int               `toml:"request_retry"`
	RequestLocktime  int64             `toml:"request_locktime"`
	Cache            bool              `toml:"cache"`
	CacheTTL         int               `toml:"cache_ttl"`
	NegativeCacheTTL int               `toml:"negative_cache_ttl"`
	HttpHeaders      map[string]string `toml:"http_headers"`
	TLS              libstns.TLS       `toml:"tls"`
	PIDFile          string            `toml:"-"`
	LogFile          string            `toml:"-"`
	LogLevel         string            `toml:"-"`
	Cached           Cached            `toml:"cached"`
}

func LoadConfig

func LoadConfig(filePath string) (*Config, error)

type Http added in v0.3.1

type Http struct {
	// contains filtered or unexported fields
}

func NewHttp added in v0.3.1

func NewHttp(config *Config, cache *ttlcache.Cache, version string) (*Http, error)

func (*Http) PrefetchUserGroups added in v0.3.1

func (h *Http) PrefetchUserGroups()

func (*Http) Request added in v0.3.1

func (h *Http) Request(path, query string) (bool, *libstns.Response, error)

Jump to

Keyboard shortcuts

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