func BuildAddrSet(endpoint AuthorityEndpoints) *destinationPb.WeightedAddrSet
BuildAddrSet converts AuthorityEndpoints into its protobuf representation
AuthorityEndpoints holds the details for the Endpoints associated to an authority
type AuthorityEndpoints struct { Namespace string ServiceID string Pods []PodDetails }
MockAPIClient satisfies the destination API's interfaces
type MockAPIClient struct { ErrorToReturn error DestinationGetClientToReturn destinationPb.Destination_GetClient }
func (c *MockAPIClient) Get(ctx context.Context, in *destinationPb.GetDestination, opts ...grpc.CallOption) (destinationPb.Destination_GetClient, error)
Get provides a mock of a destination API method.
func (c *MockAPIClient) GetProfile(ctx context.Context, _ *destinationPb.GetDestination, _ ...grpc.CallOption) (destinationPb.Destination_GetProfileClient, error)
GetProfile provides a mock of a destination API method
MockDestinationGetClient satisfies the Destination_GetClient gRPC interface.
type MockDestinationGetClient struct { UpdatesToReturn []destinationPb.Update ErrorsToReturn []error grpc.ClientStream sync.Mutex }
func (a *MockDestinationGetClient) Recv() (*destinationPb.Update, error)
Recv satisfies the Destination_GetClient.Recv() gRPC method.
MockServerStream satisfies the grpc.ServerStream interface
type MockServerStream struct {
// contains filtered or unexported fields
}
func NewMockServerStream() MockServerStream
NewMockServerStream instantiates a MockServerStream
func (ms MockServerStream) Context() context.Context
func (ms MockServerStream) RecvMsg(m interface{}) error
func (mss MockServerStream) SendHeader(metadata.MD) error
SendHeader satisfies the grpc.ServerStream interface
func (ms MockServerStream) SendMsg(m interface{}) error
func (mss MockServerStream) SetHeader(metadata.MD) error
SetHeader satisfies the grpc.ServerStream interface
func (mss MockServerStream) SetTrailer(metadata.MD)
SetTrailer satisfies the grpc.ServerStream interface
PodDetails holds the details for pod associated to an Endpoint
type PodDetails struct { Name string IP uint32 Port uint32 }