Help us shape the future of Go! Take the 2026 Go Developer Survey

api

package
v0.3.15 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API added in v0.3.13

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

API implements radius.Processor over an HTTP backend. Auth requests go to the least loaded alive address; a failing address is disabled for DisableTimeout.

func New added in v0.3.13

func New(conf Config, lg *logger.Logger) *API

func (*API) Get added in v0.3.13

func (a *API) Get(req *events.AuthRequest) (*events.AuthResponse, error)

Get answers from cache while the entry is fresh; a stale entry is still used when the backend fails.

func (*API) SendAcct added in v0.3.13

func (a *API) SendAcct(acct *events.AcctRequest)

func (*API) SendPostAuth added in v0.3.13

func (a *API) SendPostAuth(req events.AuthRequest, resp events.AuthResponse)

type Config added in v0.3.13

type Config struct {
	Auth struct {
		Addresses     []string `yaml:"addresses"`
		AliveChecking struct {
			DisableTimeout time.Duration `yaml:"disable_timeout"`
		} `yaml:"alive_checking"`
		Caching struct {
			Enabled          bool          `yaml:"enabled"`
			ActualizeTimeout time.Duration `yaml:"actualize_timeout"`
			TimeoutExpires   time.Duration `yaml:"expire_timeout"`
		} `yaml:"caching"`
	} `yaml:"auth"`
	PostAuth SenderConfig  `yaml:"postauth"`
	Acct     SenderConfig  `yaml:"acct"`
	Timeout  time.Duration `yaml:"timeout"`
}

type SenderConfig added in v0.3.13

type SenderConfig struct {
	Enabled      bool     `yaml:"enabled"`
	CountReaders int      `yaml:"count_readers"`
	Addresses    []string `yaml:"addresses"`
}

Jump to

Keyboard shortcuts

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