redis

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

README

Caddy Redis Adapter

This is a config adapter for Caddy which uses Redis to store and updates configuration based on event or periodically.

Install

First, ensure your GOROOT and GOPATH environment variables are correct for your environment.

Then, follow the xcaddy install process here.

Then, build Caddy with this Go module plugged in. For example:

$ xcaddy build --with github.com/seedcdn/caddy-redis

Use

Using this config adapter is the same as all the other config adapters.

Disclaimer

This project is not affiliated with Caddy or Redis.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdapterConfig

type AdapterConfig struct {
	Prefix           string `json:"prefix"`
	Address          string `json:"address"`
	Password         string `json:"password"`
	Database         int    `json:"database"`
	UpdateInterval   string `json:"updateInterval"`
	SubscribeUpdates string `json:"subscribeUpdates"`
}

type Config

type Config struct {
	Apps    map[string]interface{} `json:"apps"`
	Admin   interface{}            `json:"admin"`
	Storage interface{}            `json:"storage"`
	Logging interface{}            `json:"logging"`
	Adapter AdapterConfig          `json:"adapter"`
}

type Redis

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

func (*Redis) Adapt

func (r *Redis) Adapt(raw []byte, _ map[string]interface{}) ([]byte, []caddyconfig.Warning, error)

Jump to

Keyboard shortcuts

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