seeder

package
v0.0.0-...-4d94a0f Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

View Source
const (
	Push  = "push"
	Start = "start"
)
View Source
const (
	AppRoutePattern = "%s://%s.%s"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppGenerator

type AppGenerator interface {
	Apps(logger lager.Logger) []CfApp
}

func NewAppGenerator

func NewAppGenerator(config config.Config) AppGenerator

type AppStateMetrics

type AppStateMetrics struct {
	AppName    *string `json:"app_name"`
	AppGuid    *string `json:"app_guid"`
	AppURL     string  `json:"app_url"`
	PushState  *State  `json:"push"`
	StartState *State  `json:"start"`
}

type CedarReport

type CedarReport struct {
	Succeeded bool              `json:"succeeded"`
	Apps      []AppStateMetrics `json:"apps"`
}

type CfApp

type CfApp interface {
	AppName() string
	AppURL() string
	Push(logger lager.Logger, ctx context.Context, client cli.CFClient, payload string, timeout time.Duration) error
	Start(logger lager.Logger, ctx context.Context, client cli.CFClient, skipVerifyCertificate bool, timeout time.Duration) error
	Guid(logger lager.Logger, ctx context.Context, client cli.CFClient, timeout time.Duration) (string, error)
}

func NewCfApp

func NewCfApp(appName string, domain string, useTLS bool, maxFailedCurls int, manifestPath string) (CfApp, error)

type CfApplication

type CfApplication struct {
	// contains filtered or unexported fields
}

func (*CfApplication) AppName

func (a *CfApplication) AppName() string

func (*CfApplication) AppURL

func (a *CfApplication) AppURL() string

func (*CfApplication) Guid

func (a *CfApplication) Guid(logger lager.Logger, ctx context.Context, cli cli.CFClient, timeout time.Duration) (string, error)

func (*CfApplication) Push

func (a *CfApplication) Push(logger lager.Logger, ctx context.Context, cli cli.CFClient, assetDir string, timeout time.Duration) error

func (*CfApplication) SetUrl

func (a *CfApplication) SetUrl(appUrl string) error

func (*CfApplication) Start

func (a *CfApplication) Start(logger lager.Logger, ctx context.Context, cli cli.CFClient, skipVerifyCertificate bool, timeout time.Duration) error

type Deployer

type Deployer struct {
	AppsToPush  []CfApp
	AppsToStart []CfApp
	AppStates   map[string]*AppStateMetrics
	// contains filtered or unexported fields
}

func NewDeployer

func NewDeployer(config config.Config, apps []CfApp, cli cli.CFClient) Deployer

func (*Deployer) GenerateReport

func (p *Deployer) GenerateReport(ctx context.Context, cancel context.CancelFunc) bool

func (*Deployer) PushApps

func (p *Deployer) PushApps(logger lager.Logger, ctx context.Context, cancel context.CancelFunc)

func (*Deployer) StartApps

func (p *Deployer) StartApps(ctx context.Context, cancel context.CancelFunc)

type State

type State struct {
	Succeeded bool    `json:"succeeded"`
	StartTime *string `json:"start_time"`
	EndTime   *string `json:"end_time"`
	Duration  int64   `json:"duration_ns"`
}

Directories

Path Synopsis
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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