mock

package
v0.0.0-...-caeb0ac Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CAServer

type CAServer struct {
	pb.UnimplementedIstioCertificateServiceServer
	URL            string
	GRPCServer     *grpc.Server
	Authenticators []security.Authenticator

	KeyCertBundle *util.KeyCertBundle
	// contains filtered or unexported fields
}

CAServer is a mock CA server.

func NewCAServerWithKeyCert

func NewCAServerWithKeyCert(port int, key, cert []byte, opts ...grpc.ServerOption) (*CAServer, error)

func (*CAServer) Check

Check handles health check requests.

func (*CAServer) CreateCertificate

func (s *CAServer) CreateCertificate(ctx context.Context, request *pb.IstioCertificateRequest) (
	*pb.IstioCertificateResponse, error,
)

CreateCertificate handles CSR.

func (*CAServer) RejectCSR

func (s *CAServer) RejectCSR(reject bool)

RejectCSR specifies whether to send error response to CSR.

func (*CAServer) SendEmptyCert

func (s *CAServer) SendEmptyCert()

SendEmptyCert force CA server send empty cert chain.

func (*CAServer) Watch

Watch handles health check streams.

Jump to

Keyboard shortcuts

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