File: trace.go

package info (click to toggle)
golang-github-spiffe-go-spiffe 2.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,104 kB
  • sloc: makefile: 156
file content (22 lines) | stat: -rw-r--r-- 524 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package tlsconfig

import (
	"crypto/tls"
)

// GetCertificateInfo is an empty placeholder for future expansion
type GetCertificateInfo struct {
}

// GotCertificateInfo provides err and TLS certificate info to Trace
type GotCertificateInfo struct {
	Cert *tls.Certificate
	Err  error
}

// Trace is the interface to define what functions are triggered when functions
// in tlsconfig are called
type Trace struct {
	GetCertificate func(GetCertificateInfo) interface{}
	GotCertificate func(GotCertificateInfo, interface{})
}