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

fetcher

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: May 15, 2025 License: Apache-2.0 Imports: 11 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"},
	}
	TaskActiveStates = ccv3.Query{
		Key:    ccv3.StatesFilter,
		Values: []string{"PENDING", "RUNNING", "CANCELING"},
	}
)

Functions

This section is empty.

Types

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"`
}

type Fetcher

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

func NewFetcher

func NewFetcher(threads int, config *CFConfig, 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() ([]models.Task, error)

type Work

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

type WorkHandler

type WorkHandler func(*SessionExt, *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, 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