testhelpers

package
v0.0.0-...-81a4f0c Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClientMutualTLSConfig

func NewClientMutualTLSConfig(
	certFile string,
	keyFile string,
	caCertFile string,
	serverName string,
) (*tls.Config, error)

func NewServerMutualTLSConfig

func NewServerMutualTLSConfig(certFile, keyFile, caCertFile string) (*tls.Config, error)

Types

type FakeEventProducer

type FakeEventProducer struct {
	// contains filtered or unexported fields
}

func NewFakeEventProducer

func NewFakeEventProducer(certFile string, keyFile string, caCertFile string, emitInterval time.Duration) (*FakeEventProducer, error)

func (*FakeEventProducer) GetActualReq

func (*FakeEventProducer) GetAddr

func (f *FakeEventProducer) GetAddr() string

func (*FakeEventProducer) GetConnectionAttempts

func (f *FakeEventProducer) GetConnectionAttempts() int

func (*FakeEventProducer) SetEnvelops

func (f *FakeEventProducer) SetEnvelops(envelops []*loggregator_v2.Envelope)

func (*FakeEventProducer) Start

func (f *FakeEventProducer) Start()

func (*FakeEventProducer) Stop

func (f *FakeEventProducer) Stop() bool

type KeepAlive

type KeepAlive struct {
	// contains filtered or unexported fields
}

func NewKeepAlive

func NewKeepAlive(lock *sync.Mutex, conn *websocket.Conn, keepAliveInterval time.Duration) *KeepAlive

func (*KeepAlive) Run

func (k *KeepAlive) Run()

type WebsocketHandler

type WebsocketHandler struct {
	// contains filtered or unexported fields
}

func NewWebsocketHandler

func NewWebsocketHandler(m chan []byte, pingPongChan chan int, keepAlive time.Duration) *WebsocketHandler

func (*WebsocketHandler) CloseWSConnection

func (h *WebsocketHandler) CloseWSConnection()

func (*WebsocketHandler) ServeWebsocket

func (h *WebsocketHandler) ServeWebsocket(rw http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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