Help us shape the future of Go! Take the 2026 Go Developer Survey

fetcher

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LargeQuery = ccv3.Query{
		Key:    ccv3.PerPage,
		Values: []string{"5000"},
	}
	SortDesc = ccv3.Query{
		Key:    ccv3.OrderBy,
		Values: []string{"-created_at"},
	}
	DefaultTaskStates = []string{"PENDING", "RUNNING", "CANCELING"}
)

Functions

func TaskStatesQuery added in v2.1.0

func TaskStatesQuery(states []string) ccv3.Query

Types

type BBSClient

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

func NewBBSClient

func NewBBSClient(config *BBSConfig) (*BBSClient, error)

func (*BBSClient) GetActualLRPs

func (b *BBSClient) GetActualLRPs() ([]*models.ActualLRP, error)

func (*BBSClient) TestConnection

func (b *BBSClient) TestConnection() error

type BBSConfig

type BBSConfig struct {
	URL            string `yaml:"url"`
	Timeout        int    `yaml:"timeout"`
	CAFile         string `yaml:"ca_file"`
	CertFile       string `yaml:"cert_file"`
	KeyFile        string `yaml:"key_file"`
	SkipCertVerify bool   `yaml:"skip_cert_verify"`
}

type CFConfig

type CFConfig struct {
	SkipSSLValidation bool   `yaml:"skip_ssl_validation"`
	URL               string `yaml:"url"`
	ClientID          string `yaml:"client_id"`
	ClientSecret      string `yaml:"client_secret"`
	Username          string `yaml:"username"`
	Password          string `yaml:"password"`
	TaskStates        []string
}

type Fetcher

type Fetcher struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewFetcher

func NewFetcher(threads int, config *CFConfig, bbsConfig *BBSConfig, filter *filters.Filter) *Fetcher

func (*Fetcher) GetObjects

func (c *Fetcher) GetObjects() *models.CFObjects

type SessionExt

type SessionExt struct {
	clients.Session
}

func NewSessionExt

func NewSessionExt(config *CFConfig) (*SessionExt, error)

func (SessionExt) GetApplications

func (s SessionExt) GetApplications() ([]models.Application, error)

func (SessionExt) GetEvents

func (s SessionExt) GetEvents(query ...ccv3.Query) ([]models.Event, error)

func (SessionExt) GetInfo

func (s SessionExt) GetInfo() (models.Info, error)

func (SessionExt) GetOrganizationQuotas

func (s SessionExt) GetOrganizationQuotas() ([]models.Quota, error)

func (SessionExt) GetSpaceQuotas

func (s SessionExt) GetSpaceQuotas() ([]models.Quota, error)

func (SessionExt) GetSpaceSummary

func (s SessionExt) GetSpaceSummary(guid string) (*models.SpaceSummary, error)

func (SessionExt) GetTasks

func (s SessionExt) GetTasks(states []string) ([]models.Task, error)

type Work

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

type WorkHandler

type WorkHandler func(*SessionExt, *BBSClient, *models.CFObjects) error

type Worker

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

func NewWorker

func NewWorker(threads int, filter *filters.Filter) *Worker

func (*Worker) Do

func (c *Worker) Do(session *SessionExt, bbs *BBSClient, result *models.CFObjects) error

func (*Worker) Push

func (c *Worker) Push(name string, handler WorkHandler)

func (*Worker) PushIf

func (c *Worker) PushIf(name string, handler WorkHandler, anyArgs ...string)

func (*Worker) Reset

func (c *Worker) Reset()

func (*Worker) Wait

func (c *Worker) Wait() error

Jump to

Keyboard shortcuts

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