Documentation
¶
Index ¶
- Constants
- type Reservoir
- func (Reservoir) CaddyModule() caddy.ModuleInfo
- func (r *Reservoir) DepositClientHello(addr string, ch *clienthellod.ClientHello)
- func (r *Reservoir) Provision(ctx caddy.Context) error
- func (r *Reservoir) Start() error
- func (r *Reservoir) Stop() error
- func (r *Reservoir) WithdrawClientHello(addr string) (ch *clienthellod.ClientHello)
Constants ¶
View Source
const ( CaddyAppID = "clienthellod" DEFAULT_RESERVOIR_ENTRY_VALID_FOR = 10 * time.Second DEFAULT_RESERVOIR_CLEANING_INTERVAL = 10 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reservoir ¶
type Reservoir struct {
ValidFor caddy.Duration `json:"valid_for,omitempty"`
CleanInterval caddy.Duration `json:"clean_interval,omitempty"`
// contains filtered or unexported fields
}
Reservoir implements caddy.App. It is used to store the ClientHello extracted from the incoming TLS by ListenerWrapper for later use by the Handler when ServeHTTP is called.
func (Reservoir) CaddyModule ¶
func (Reservoir) CaddyModule() caddy.ModuleInfo
CaddyModule implements CaddyModule() of caddy.Module. It returns the Caddy module information.
func (*Reservoir) DepositClientHello ¶
func (r *Reservoir) DepositClientHello(addr string, ch *clienthellod.ClientHello)
DepositClientHello stores the ClientHello extracted from the incoming TLS connection into the reservoir, with the client address as the key.
func (*Reservoir) WithdrawClientHello ¶
func (r *Reservoir) WithdrawClientHello(addr string) (ch *clienthellod.ClientHello)
WithdrawClientHello retrieves the ClientHello from the reservoir and deletes it from the reservoir, using the client address as the key.
Click to show internal directories.
Click to hide internal directories.