mock

package
v0.0.0-...-676ba0e Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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

Jump to

Keyboard shortcuts

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