Documentation ¶
Index ¶
- Constants
- func CreateCert(cname string) tls.Certificate
- func CreateCertDER(cname string) (*rsa.PrivateKey, []byte)
- func CreateECCert(cname string) tls.Certificate
- func CreateECKeyPair(cname string) (keyPEM, certPEM []byte)
- func CreateKeyPair(cname string) (keyPEM, certPEM []byte)
- func CreateKeyPairFromDER(certDER []byte, privKey *rsa.PrivateKey) (keyPEM, certPEM []byte)
- func CreateSignedCertDER(cname string, parentCert x509.Certificate, parentKey *rsa.PrivateKey) (*rsa.PrivateKey, []byte)
- func NewFakeMetron() *fakeMetron
- func NewRequest(method, host, rawPath string, body io.Reader) *http.Request
- func NewResponse(status int) *http.Response
- func NextAvailPort() uint16
- func RegisterAddr(reg *registry.RouteRegistry, path string, addr string, cfg RegisterConfig)
- func RegisterHandler(reg *registry.RouteRegistry, path string, handler connHandler, ...) net.Listener
- func SpecConfig(statusPort, proxyPort uint16, natsPorts ...uint16) *config.Config
- func SpecSSLConfig(statusPort, proxyPort, SSLPort uint16, natsPorts ...uint16) (*config.Config, *tls.Config)
- type CertChain
- type CertNames
- type Event
- type FakeFile
- type FakeMetron
- type HangingReadCloser
- type HttpConn
- func (x *HttpConn) CheckLine(expected string)
- func (x *HttpConn) CheckLines(expected []string)
- func (x *HttpConn) ReadRequest() (*http.Request, string)
- func (x *HttpConn) ReadResponse() (*http.Response, string)
- func (x *HttpConn) WriteLine(line string)
- func (x *HttpConn) WriteLines(lines []string)
- func (x *HttpConn) WriteRequest(req *http.Request)
- func (x *HttpConn) WriteResponse(resp *http.Response)
- type NATSRunner
- type Nats
- type RegisterConfig
- type SubjectAltNames
- type TestZapLogger
- type TestZapSink
Constants ¶
View Source
const LocalhostDNS = "localhost.routing.cf-app.com"
Variables ¶
This section is empty.
Functions ¶
func CreateCert ¶
func CreateCert(cname string) tls.Certificate
func CreateCertDER ¶
func CreateCertDER(cname string) (*rsa.PrivateKey, []byte)
func CreateECCert ¶
func CreateECCert(cname string) tls.Certificate
func CreateECKeyPair ¶
func CreateKeyPair ¶
func CreateKeyPairFromDER ¶
func CreateKeyPairFromDER(certDER []byte, privKey *rsa.PrivateKey) (keyPEM, certPEM []byte)
func CreateSignedCertDER ¶
func CreateSignedCertDER(cname string, parentCert x509.Certificate, parentKey *rsa.PrivateKey) (*rsa.PrivateKey, []byte)
func NewFakeMetron ¶
func NewFakeMetron() *fakeMetron
func NewResponse ¶
func NextAvailPort ¶
func NextAvailPort() uint16
func RegisterAddr ¶
func RegisterAddr(reg *registry.RouteRegistry, path string, addr string, cfg RegisterConfig)
func RegisterHandler ¶
func RegisterHandler(reg *registry.RouteRegistry, path string, handler connHandler, cfg ...RegisterConfig) net.Listener
Types ¶
type CertChain ¶
type CertChain struct {
CertPEM, CACertPEM []byte
PrivKeyPEM, CAPrivKeyPEM []byte
CACert *x509.Certificate
CAPrivKey *rsa.PrivateKey
}
func (*CertChain) AsTLSConfig ¶
func (*CertChain) TLSCert ¶
func (c *CertChain) TLSCert() tls.Certificate
func (*CertChain) WriteCACertToDir ¶
type CertNames ¶
type CertNames struct { CommonName string SANs SubjectAltNames }
type FakeMetron ¶
type HangingReadCloser ¶
type HangingReadCloser struct {
// contains filtered or unexported fields
}
func (*HangingReadCloser) Close ¶
func (h *HangingReadCloser) Close() error
type HttpConn ¶
func NewHttpConn ¶
func (*HttpConn) CheckLines ¶
func (*HttpConn) WriteLines ¶
func (*HttpConn) WriteRequest ¶
func (*HttpConn) WriteResponse ¶
type NATSRunner ¶
type NATSRunner struct { MessageBus *nats.Conn // contains filtered or unexported fields }
func NewNATSRunner ¶
func NewNATSRunner(port int) *NATSRunner
func (*NATSRunner) KillWithFire ¶
func (runner *NATSRunner) KillWithFire()
func (*NATSRunner) Start ¶
func (runner *NATSRunner) Start()
func (*NATSRunner) Stop ¶
func (runner *NATSRunner) Stop()
type Nats ¶
type Nats struct {
// contains filtered or unexported fields
}
func NewNatsOnRandomPort ¶
func NewNatsOnRandomPort() *Nats
type RegisterConfig ¶
type SubjectAltNames ¶
type TestZapLogger ¶
type TestZapLogger struct { logger.Logger *TestZapSink }
TestZapLogger implements a zap logger that can be used with Ginkgo tests
func NewTestZapLogger ¶
func NewTestZapLogger(component string) *TestZapLogger
NewTestZapLogger returns a new test logger using zap
func (*TestZapLogger) Buffer ¶
func (z *TestZapLogger) Buffer() *gbytes.Buffer
Buffer returns the gbytes buffer that was used as the sink
type TestZapSink ¶
Taken from github.com/uber-go/zap
func (*TestZapSink) Lines ¶
func (s *TestZapSink) Lines() []string
func (*TestZapSink) Sync ¶
func (s *TestZapSink) Sync() error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.