cache_populator

package
v4.2.4 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagLogLevel = "log_level"
)

Variables

This section is empty.

Functions

func CreateCachePopulatorCommand

func CreateCachePopulatorCommand() *cobra.Command

Types

type CacheConfig

type CacheConfig struct {
	ServerAddress  string        `json:"server_address"`
	Interval       time.Duration `json:"interval"`
	ContextTimeout time.Duration `json:"context_timeout"`
	Requests       []Request     `json:"requests"`
}

CacheConfig represents a single server configuration with its requests

func (*CacheConfig) UnmarshalJSON

func (c *CacheConfig) UnmarshalJSON(data []byte) error

UnmarshalJSON implements custom JSON unmarshaling for CacheConfig

type Request

type Request struct {
	Type    string            `json:"type,omitempty"`
	Body    string            `json:"body,omitempty"`
	Path    string            `json:"path,omitempty"`
	Headers map[string]string `json:"headers,omitempty"`
}

Request represents a single HTTP request configuration

Jump to

Keyboard shortcuts

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