github

package
v0.0.0-...-594b3ed Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// vars for mocking purposes, during testing
	GetRenovateConfigFn func(registrySecret *corev1.Secret) (string, error)
	GetTokenFn          func() (string, error)
)

Functions

This section is empty.

Types

type AppInstallation

type AppInstallation struct {
	InstallationID int64
	Repositories   []string
}

type Component

type Component struct {
	base.BaseComponent
	AppID         int64
	AppPrivateKey []byte
	// contains filtered or unexported fields
}

func NewComponent

func NewComponent(ctx context.Context, comp *appstudiov1alpha1.Component, client client.Client) (*Component, error)

func (*Component) GetAPIEndpoint

func (c *Component) GetAPIEndpoint() string

func (*Component) GetBranch

func (c *Component) GetBranch() (string, error)

func (*Component) GetRenovateConfig

func (c *Component) GetRenovateConfig(registrySecret *corev1.Secret) (string, error)

func (*Component) GetToken

func (c *Component) GetToken() (string, error)

type StaleAllowedCache

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

StaleAllowedCache refreshes data in the background while optionally serving stale data to maintain low latency during refreshes.

func NewStaleAllowedCache

func NewStaleAllowedCache(refreshPeriod time.Duration, refreshFunc func() (interface{}, error)) *StaleAllowedCache

func (*StaleAllowedCache) Get

func (c *StaleAllowedCache) Get(key string) (interface{}, bool)

Get returns data from the cache, possibly stale data if a refresh is currently in progress. On first access, this call will block until data is available.

type TokenCache

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

func (*TokenCache) Get

func (c *TokenCache) Get(key string) (TokenInfo, bool)

func (*TokenCache) Set

func (c *TokenCache) Set(key string, tokenInfo TokenInfo)

type TokenInfo

type TokenInfo struct {
	Token     string
	ExpiresAt time.Time
}

Jump to

Keyboard shortcuts

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