Documentation
¶
Overview ¶
Package site contains site local constants for the paris tool.
Index ¶
Constants ¶
const ClientTag = "client:paris"
Client tag used for PARIS tasks scheduling.
const CloudOAuthScope = "https://www.googleapis.com/auth/cloud-platform"
OAuth scope for the whole of cloud platform.
const VersionNumber = "2.1.2"
VersionNumber is the version number for the tool. It follows the Semantic Versioning Specification (http://semver.org) and the format is: "MAJOR.MINOR.0+BUILD_TIME". We can ignore the PATCH part (i.e. it's always 0) to make the maintenance work easier. We can also print out the build time (e.g. 20060102150405) as the METADATA when show version to users.
Variables ¶
var DefaultAuthOptions auth.Options
DefaultAuthOptions is an auth.Options struct prefilled with chrome-infra defaults.
var DefaultPRPCOptions = prpcOptionWithUserAgent(fmt.Sprintf("paris/%s", VersionNumber))
DefaultPRPCOptions is used for PRPC clients. If it is nil, the default value is used. See prpc.Options for details.
This is provided so it can be overridden for testing.
var Dev = Environment{
AdminService: "chromeos-skylab-bot-fleet.appspot.com",
ServiceAccount: "skylab-admin-task@chromeos-service-accounts-dev.iam.gserviceaccount.com",
UFSService: "staging.ufs.api.cr.dev",
}
Dev is the environment for dev.
var EthernetHookCallbackOptions = func() auth.Options { o := DefaultAuthOptions o.Scopes = append(o.Scopes, CloudOAuthScope) return o }()
EthernetHookCallbackOptions includes OAuth scopes that include, at minimum, the ability to read from Google Storage.
var Prod = Environment{
AdminService: "chromeos-skylab-bot-fleet.appspot.com",
ServiceAccount: "skylab-admin-task@chromeos-service-accounts.iam.gserviceaccount.com",
UFSService: "ufs.api.cr.dev",
}
Prod is the environment for prod.
var UFSPRPCOptions = prpcOptionWithUserAgent("paris/6.0.0")
UFSPRPCOptions is used for UFS PRPC clients.
Functions ¶
This section is empty.
Types ¶
type BuildbucketBuilderInfo ¶
type BuildbucketBuilderInfo struct { Host string BuilderID *buildbucket_pb.BuilderID }
BuildbucketBuilderInfo contains information for initializing a Buildbucket client that talks to a specific builder.
type CommonFlags ¶
type CommonFlags struct {
Verbose bool
}
CommonFlags contains generic CLI flags that are theoretically common to all commands.
func (*CommonFlags) Register ¶
func (f *CommonFlags) Register(fl *flag.FlagSet)
Register sets up the common flags.
type EnvFlags ¶
type EnvFlags struct {
// contains filtered or unexported fields
}
EnvFlags controls selection of the environment: either prod (default) or dev.
func (EnvFlags) Env ¶
func (f EnvFlags) Env() Environment
Env returns the environment, either dev or prod.
type EnvWrapper ¶
type EnvWrapper struct {
// contains filtered or unexported fields
}
EnvWrapper wraps Environment to satisfy the worker.Environment interface and swarming.Environment interface.
type Environment ¶
type Environment struct { AdminService string ServiceAccount string // UFS-specific values UFSService string }
Environment contains environment specific values.
func (Environment) Wrapped ¶
func (e Environment) Wrapped() EnvWrapper
Wrapped returns the environment wrapped in a helper type to satisfy the worker.Environment interface and swarming.Environment interface.