tree

package
v0.0.0-...-51f9457 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package tree implements fetching tree status from Tree Status App.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// FetchLatest fetches the latest tree status.
	FetchLatest(ctx context.Context, endpoint string) (Status, error)
}

Client defines the interface that interacts with Tree status App.

func NewClient

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

type State

type State int8

State enumerates possible values for tree state.

Source of Truth: https://source.chromium.org/chromium/infra/infra/+/52a8cfcb436b0012e668630a2f261237046a033a:appengine/chromium_status/appengine_module/chromium_status/status.py;l=233-248

const (
	StateUnknown State = iota
	Open
	Closed
	Throttled
	InMaintenance
)

type Status

type Status struct {
	// State describes the Tree state.
	State State
	// Since is the timestamp when the tree obtains the current state.
	Since time.Time
}

Status models the status returned by tree status app.

Note that only fields that are needed in CV are included. Source of Truth: https://source.chromium.org/chromium/infra/infra/+/52a8cfcb436b0012e668630a2f261237046a033a:appengine/chromium_status/appengine_module/chromium_status/status.py;l=209-252

Directories

Path Synopsis
Package treetest implements fake Tree for testing in CV.
Package treetest implements fake Tree for testing in CV.

Jump to

Keyboard shortcuts

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