mock

package
Version: v0.0.0-...-d2b96bb Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BufDialer

func BufDialer(ctx context.Context, address string) (net.Conn, error)

Types

type CASServer

type CASServer struct {
	Server  *grpc.Server
	Address string
}

CASServer is the mocked Google CAS server.

func CreateServer

func CreateServer(service *CASService) (*CASServer, *bufconn.Listener, error)

CreateServer creates a mocked local Google CAS server and runs it in a separate goroutine.

func (*CASServer) Stop

func (s *CASServer) Stop()

Stop stops the Mock Mesh CA server.

type CASService

type CASService struct {
	privatecapb.UnimplementedCertificateAuthorityServiceServer
	CertPEM      string
	CertChainPEM []string
	CaCertBundle [][]string
}

CASService is a mock Google CAS Service.

func (CASService) CreateCertificate

CreateCertificate is a mocked function for the Google CAS CA API.

type ContextDialer

type ContextDialer func(ctx context.Context, address string) (net.Conn, error)

func ContextDialerCreate

func ContextDialerCreate(listener *bufconn.Listener) ContextDialer

Source Files

Jump to

Keyboard shortcuts

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