stapler

package
v0.8.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2015 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const ErrRetryPeriod = 60 * time.Second

Variables

This section is empty.

Functions

This section is empty.

Types

type StapleResponse

type StapleResponse struct {
	Staple   []byte
	Response *ocsp.Response
}

func (*StapleResponse) IsValid

func (s *StapleResponse) IsValid() bool

func (*StapleResponse) String

func (s *StapleResponse) String() string

type StapleUpdated

type StapleUpdated struct {
	HostKey engine.HostKey
	Staple  *StapleResponse
	Err     error
}

StapleUpdated is generated whenever stapler status gets updated

func (*StapleUpdated) String

func (s *StapleUpdated) String() string

type Stapler

type Stapler interface {
	// HasHost returns true if Stapler holds the response in cache
	HasHost(host engine.HostKey) bool
	// StapleHost returns the relevant StapleResponse, or error in case if response is unavailable
	StapleHost(host *engine.Host) (*StapleResponse, error)
	// DeleteHost deletes any OCSP data associated with the host entry
	DeleteHost(host engine.HostKey)
	// Subscribe subscribes the channel to the series of OCSP updates
	Subscribe(chan *StapleUpdated, chan struct{})
	// Close closes all subscription activities and deallocate internal resources
	Close() error
}

Stapler is an interface for the OCSP staple cache implementations

func New

func New(opts ...StaplerOption) Stapler

New returns a new instance of in-memory Staple resolver and cache

type StaplerOption

type StaplerOption func(s *stapler)

StaplerOption is used for optional parameters for the New function

func Clock

Clock is an optional argument to the New function, by default the system clock is used

Jump to

Keyboard shortcuts

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