cv

package
v0.0.0-...-f248f4a Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package cv contains logic of interacting with CV (LUCI Change Verifier).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UseFakeClient

func UseFakeClient(ctx context.Context, runs map[string]*cvv0.Run) context.Context

Types

type Client

type Client interface {
	GetRun(ctx context.Context, in *cvv0.GetRunRequest, opts ...grpc.CallOption) (*cvv0.Run, error)
}

Client defines a subset of CV API consumed by LUCI Analysis.

func NewClient

func NewClient(ctx context.Context, host string) (Client, error)

NewClient creates a client to communicate with CV.

type FakeClient

type FakeClient struct {
	Runs map[string]*cvv0.Run
}

FakeClient provides a fake implementation of cvv0.RunsClient for testing.

func (*FakeClient) GetRun

func (fc *FakeClient) GetRun(ctx context.Context, req *cvv0.GetRunRequest, opts ...grpc.CallOption) (*cvv0.Run, error)

GetRun mocks cvv0.RunsClient.GetRun RPC.

Jump to

Keyboard shortcuts

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