Documentation ¶
Index ¶
Constants ¶
View Source
const ErrRetryPeriod = 60 * time.Second
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetCertificateFunc ¶
type GetCertificateFunc func(*tls.ClientHelloInfo) (*tls.Certificate, error)
type StapleHostOption ¶
type StapleHostOption func(s *hostStapler)
func WithGetCertFunc ¶
func WithGetCertFunc(hostName string, getCertFunc GetCertificateFunc) StapleHostOption
type StapleResponse ¶
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, opts ...StapleHostOption) (*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 ¶
func Clock(clock timetools.TimeProvider) StaplerOption
Clock is an optional argument to the New function, by default the system clock is used
Click to show internal directories.
Click to hide internal directories.