istio: Index | Files

package mock

import ""


Package Files


type FakeProtocol Uses

type FakeProtocol struct {
    // contains filtered or unexported fields

FakeProtocol is a fake for testing, implements CAProtocol interface.

func NewFakeProtocol Uses

func NewFakeProtocol(response *pb.CsrResponse, err string) *FakeProtocol

NewFakeProtocol returns a FakeProtocol with configured response and expected error.

func (*FakeProtocol) InvokeTimes Uses

func (f *FakeProtocol) InvokeTimes() int

InvokeTimes returns the times that SendCSR has been invoked.

func (*FakeProtocol) SendCSR Uses

func (f *FakeProtocol) SendCSR(req *pb.CsrRequest) (*pb.CsrResponse, error)

SendCSR returns the result based on the predetermined config.

Package mock imports 2 packages (graph). Updated 2018-11-15. Refresh now. Tools for package owners.