internal

package
v0.0.0-...-2dc964c Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Accumulator

type Accumulator func(json.RawMessage) error

type AppGuidCache

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

func NewAppGuidCache

func NewAppGuidCache(appGetter appGetter, spaceGuid string) *AppGuidCache

func (*AppGuidCache) Get

func (c *AppGuidCache) Get(name string) (string, error)

func (*AppGuidCache) Invalidate

func (c *AppGuidCache) Invalidate()

func (*AppGuidCache) TryWithRefresh

func (c *AppGuidCache) TryWithRefresh(appName string, f func(appGuid string) error) error

type CapiClient

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

func NewCapiClient

func NewCapiClient(requestor capiRequestor) *CapiClient

func (*CapiClient) Apps

func (c *CapiClient) Apps(query map[string]string) ([]models.App, error)

func (*CapiClient) CreateTask

func (c *CapiClient) CreateTask(appGuid, command string, cfg models.TaskConfig, opts ...models.HeaderOption) (models.Task, error)

func (*CapiClient) Process

func (c *CapiClient) Process(appGuid, processType string) (models.Process, error)

func (*CapiClient) Scale

func (c *CapiClient) Scale(appGuid, processType string, instanceCount uint) error

func (*CapiClient) Stop

func (c *CapiClient) Stop(appGuid string) error

type CapiDoer

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

func NewCapiDoer

func NewCapiDoer(httpClient httpClient, capiUrl string, tokenGetter tokenGetter) *CapiDoer

func (*CapiDoer) Do

func (c *CapiDoer) Do(method, path, body string, v interface{}, opts ...models.HeaderOption) error

func (*CapiDoer) GetPagedResources

func (c *CapiDoer) GetPagedResources(path string, a Accumulator, opts ...models.HeaderOption) error

type CapiError

type CapiError struct {
	ResponseCode int
	// contains filtered or unexported fields
}

func (*CapiError) Error

func (e *CapiError) Error() string

type OauthClient

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

func NewClientCredentialsOauthClient

func NewClientCredentialsOauthClient(httpClient httpClient, oauthUrl, client, secret string) *OauthClient

func NewUserOauthClient

func NewUserOauthClient(httpClient httpClient, oauthUrl, username, password string) *OauthClient

func (*OauthClient) Token

func (c *OauthClient) Token() (string, error)

func (*OauthClient) TokenWithExpiry

func (c *OauthClient) TokenWithExpiry() (TokenWithExpiry, error)

type TokenCache

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

func NewTokenCache

func NewTokenCache(tokenGetter tokenWithExpiryGetter) *TokenCache

func (*TokenCache) Token

func (c *TokenCache) Token() (string, error)

type TokenWithExpiry

type TokenWithExpiry struct {
	Token     string
	ExpiresAt time.Time
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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