Documentation ¶
Index ¶
- Constants
- func NewDigitalOceanAuth(pat string) oauth2.TokenSource
- type AwsProvider
- func (p *AwsProvider) List(ctx context.Context) error
- func (p *AwsProvider) SetKeys(keys []string)
- func (p *AwsProvider) Sizes(ctx context.Context) error
- func (p *AwsProvider) Spinup(ctx context.Context, settings ProviderSpinSettings) error
- func (p *AwsProvider) Term(ctx context.Context, settings ProviderTermSettings) error
- type AwsSpinSettings
- func (aws *AwsSpinSettings) BenchMemString() string
- func (aws *AwsSpinSettings) Count() int
- func (aws *AwsSpinSettings) Cpus() string
- func (aws *AwsSpinSettings) GitURL() string
- func (aws *AwsSpinSettings) GoVersion() string
- func (aws *AwsSpinSettings) InstanceTypeString() string
- func (aws *AwsSpinSettings) LeaveRunning() bool
- func (aws *AwsSpinSettings) MaxCpu() int
- func (aws *AwsSpinSettings) Regex() string
- func (aws *AwsSpinSettings) Stat() bool
- type AwsTermSettings
- type DigitalOceanProvider
- func (p *DigitalOceanProvider) List(ctx context.Context) error
- func (p *DigitalOceanProvider) SetKeys(keys []string)
- func (p *DigitalOceanProvider) Sizes(ctx context.Context) error
- func (p *DigitalOceanProvider) Spinup(ctx context.Context, settings ProviderSpinSettings) error
- func (p *DigitalOceanProvider) Term(ctx context.Context, settings ProviderTermSettings) error
- type DoSpinSettings
- func (do *DoSpinSettings) BenchMemString() string
- func (do *DoSpinSettings) Count() int
- func (do *DoSpinSettings) Cpus() string
- func (do *DoSpinSettings) GitURL() string
- func (do *DoSpinSettings) GoVersion() string
- func (do *DoSpinSettings) InstanceTypeString() string
- func (do *DoSpinSettings) LeaveRunning() bool
- func (do *DoSpinSettings) MaxCpu() int
- func (do *DoSpinSettings) Regex() string
- func (do *DoSpinSettings) Stat() bool
- type DoTermSettings
- type Provider
- type ProviderSpinSettings
- type ProviderTermSettings
Constants ¶
View Source
const ( AwsProviderInstanceNameFmt = "corebench-aws-%s" AwsBenchReadyScript = "export GOPATH=/home/ubuntu/go && while [ ! -f $GOPATH/.core-init ]; do sleep 1; done" AwsBenchCommandTemplate = `` /* 201-byte string literal not displayed */ AwsBenchStatTemplate = " | tee benchmark.log && echo '\n\n' && $GOPATH/bin/benchstat benchmark.log" )
View Source
const CfnTemplate = `` /* 4449-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func NewDigitalOceanAuth ¶
func NewDigitalOceanAuth(pat string) oauth2.TokenSource
Types ¶
type AwsProvider ¶
type AwsProvider struct { Keyfile string // contains filtered or unexported fields }
func (*AwsProvider) SetKeys ¶
func (p *AwsProvider) SetKeys(keys []string)
func (*AwsProvider) Spinup ¶
func (p *AwsProvider) Spinup(ctx context.Context, settings ProviderSpinSettings) error
func (*AwsProvider) Term ¶
func (p *AwsProvider) Term(ctx context.Context, settings ProviderTermSettings) error
type AwsSpinSettings ¶
type AwsSpinSettings struct { Benchmem bool CountFlag int InstanceType string Cpu string Git string GoVersionFlag string LeaveRunningFlag bool RegexFlag string StatFlag bool }
func (*AwsSpinSettings) BenchMemString ¶
func (aws *AwsSpinSettings) BenchMemString() string
func (*AwsSpinSettings) Count ¶
func (aws *AwsSpinSettings) Count() int
func (*AwsSpinSettings) Cpus ¶
func (aws *AwsSpinSettings) Cpus() string
func (*AwsSpinSettings) GitURL ¶
func (aws *AwsSpinSettings) GitURL() string
func (*AwsSpinSettings) GoVersion ¶
func (aws *AwsSpinSettings) GoVersion() string
func (*AwsSpinSettings) InstanceTypeString ¶
func (aws *AwsSpinSettings) InstanceTypeString() string
func (*AwsSpinSettings) LeaveRunning ¶
func (aws *AwsSpinSettings) LeaveRunning() bool
func (*AwsSpinSettings) MaxCpu ¶
func (aws *AwsSpinSettings) MaxCpu() int
func (*AwsSpinSettings) Regex ¶
func (aws *AwsSpinSettings) Regex() string
func (*AwsSpinSettings) Stat ¶
func (aws *AwsSpinSettings) Stat() bool
type AwsTermSettings ¶
func (*AwsTermSettings) ShouldTerm ¶
func (aws *AwsTermSettings) ShouldTerm(name, ip string) bool
type DigitalOceanProvider ¶
type DigitalOceanProvider struct {
// contains filtered or unexported fields
}
func (*DigitalOceanProvider) SetKeys ¶
func (p *DigitalOceanProvider) SetKeys(keys []string)
func (*DigitalOceanProvider) Sizes ¶
func (p *DigitalOceanProvider) Sizes(ctx context.Context) error
func (*DigitalOceanProvider) Spinup ¶
func (p *DigitalOceanProvider) Spinup(ctx context.Context, settings ProviderSpinSettings) error
func (*DigitalOceanProvider) Term ¶
func (p *DigitalOceanProvider) Term(ctx context.Context, settings ProviderTermSettings) error
type DoSpinSettings ¶
type DoSpinSettings struct { Benchmem bool CountFlag int InstanceType string Cpu string Git string GoVersionFlag string LeaveRunningFlag bool RegexFlag string StatFlag bool }
func (*DoSpinSettings) BenchMemString ¶
func (do *DoSpinSettings) BenchMemString() string
func (*DoSpinSettings) Count ¶
func (do *DoSpinSettings) Count() int
func (*DoSpinSettings) Cpus ¶
func (do *DoSpinSettings) Cpus() string
func (*DoSpinSettings) GitURL ¶
func (do *DoSpinSettings) GitURL() string
func (*DoSpinSettings) GoVersion ¶
func (do *DoSpinSettings) GoVersion() string
func (*DoSpinSettings) InstanceTypeString ¶
func (do *DoSpinSettings) InstanceTypeString() string
func (*DoSpinSettings) LeaveRunning ¶
func (do *DoSpinSettings) LeaveRunning() bool
func (*DoSpinSettings) MaxCpu ¶
func (do *DoSpinSettings) MaxCpu() int
func (*DoSpinSettings) Regex ¶
func (do *DoSpinSettings) Regex() string
func (*DoSpinSettings) Stat ¶
func (do *DoSpinSettings) Stat() bool
type DoTermSettings ¶
func (*DoTermSettings) ShouldTerm ¶
func (do *DoTermSettings) ShouldTerm(name, ip string) bool
type Provider ¶
type Provider interface { // Spinup provisions and benchmarks in one shot. Spinup(context.Context, ProviderSpinSettings) error // SetKeys allows you to specify your SSH keys to be installed on the resource. SetKeys(keys []string) // List will list any provisioned instances created by corebench. List(context.Context) error // Term terminates instance provisioned by corebench. Term(context.Context, ProviderTermSettings) error // Sizes lists the box sizes that can be provisioned by the provider. Sizes(context.Context) error }
Provider is some type of provider.
func NewAwsProvider ¶
func NewAwsProvider() Provider
func NewDigitalOceanProvider ¶
type ProviderSpinSettings ¶
type ProviderTermSettings ¶
Click to show internal directories.
Click to hide internal directories.