Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchFiles ¶
FetchFiles download files from gitiles.
func InvPathForDut ¶
InvPathForDut generates the relative path to the inventory git repo for a given DUT. e.g. data/skylab/chromeos6/chromeos6-***.textpb
func IsEmptyErr ¶
IsEmptyErr returns true if the given error is because of am empty commit.
Types ¶
type GerritClient ¶
type GerritClient interface { GetChange(ctx context.Context, in *gerrit.GetChangeRequest, opts ...grpc.CallOption) (*gerrit.ChangeInfo, error) CreateChange(ctx context.Context, in *gerrit.CreateChangeRequest, opts ...grpc.CallOption) (*gerrit.ChangeInfo, error) SubmitChange(ctx context.Context, in *gerrit.SubmitChangeRequest, opts ...grpc.CallOption) (*gerrit.ChangeInfo, error) AbandonChange(ctx context.Context, in *gerrit.AbandonChangeRequest, opts ...grpc.CallOption) (*gerrit.ChangeInfo, error) ChangeEditFileContent(ctx context.Context, in *gerrit.ChangeEditFileContentRequest, opts ...grpc.CallOption) (*empty.Empty, error) DeleteEditFileContent(ctx context.Context, in *gerrit.DeleteEditFileContentRequest, opts ...grpc.CallOption) (*empty.Empty, error) ChangeEditPublish(ctx context.Context, in *gerrit.ChangeEditPublishRequest, opts ...grpc.CallOption) (*empty.Empty, error) SetReview(ctx context.Context, in *gerrit.SetReviewRequest, opts ...grpc.CallOption) (*gerrit.ReviewResult, error) }
GerritClient is a client interface for Gerrit API.
This is a subset of the interface defined at luci/common/proto/gerrit.
type GitilesClient ¶
type GitilesClient interface { Log(ctx context.Context, req *gitiles.LogRequest, opts ...grpc.CallOption) (*gitiles.LogResponse, error) Archive(ctx context.Context, in *gitiles.ArchiveRequest, opts ...grpc.CallOption) (*gitiles.ArchiveResponse, error) }
GitilesClient is a client interface for Gitiles API.
This is a subset of the interface defined at luci/common/proto/gitiles.
type InventoryStore ¶
type InventoryStore struct { *inventory.Lab *inventory.Infrastructure // contains filtered or unexported fields }
InventoryStore exposes skylab inventory data in git.
Call InventoryStore.Refresh() to obtain the initial inventory data. After making modifications to the inventory, call InventoryStore.Commit(). Call InventoryStore.Refresh() again if you want to use the object beyond a InventoryStore.Commit(), to re-validate the store.
func NewInventoryStore ¶
func NewInventoryStore(gerritC GerritClient, gitilesC GitilesClient) *InventoryStore
NewInventoryStore returns a new InventoryStore.
The returned store is not refreshed, hence all inventory data is empty.