MCPcopy
hub / github.com/vulcand/vulcand / stapler

Struct stapler

stapler/stapler.go:93–113  ·  view source on GitHub ↗

stapler is an internal in-memory implementation of the staple retriever and cache

Source from the content-addressed store, hash-verified

91
92// stapler is an internal in-memory implementation of the staple retriever and cache
93type stapler struct {
94 // host stapler is a cached OCSP response for particular host
95 v map[string]*hostStapler
96 mtx *sync.Mutex
97 clock timetools.TimeProvider
98 // eventsC is used to communicate updates from the timer-based updaters
99 eventsC chan *stapleFetched
100 // cnt used to generate unique id for each staple update job
101 cnt int32
102 // closeC singlas close for all running operations
103 closeC chan struct{}
104 // client used to query OCSP responders
105 client *http.Client
106 // subcscibrers holds a list of subscribers for OCSP updates
107 subscribers map[int32]chan *StapleUpdated
108
109 // these channels are set up for test purposes
110 discardC chan bool
111 beforeUpdateC chan bool
112 kickC chan bool
113}
114
115func (s *stapler) StapleHost(host *engine.Host, opts ...StapleHostOption) (*StapleResponse, error) {
116 if host.Settings.KeyPair == nil && host.Settings.AutoCert == nil {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected