app

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

func New

func New(ctx context.Context, logger *zap.Logger, cfg Config) (*App, error)

func (*App) Close

func (a *App) Close(ctx context.Context) error

func (*App) Health

func (a *App) Health(ctx context.Context) error

func (*App) NewSession

func (a *App) NewSession() *Session

type CloudPlatformType

type CloudPlatformType string
const (
	AwsCloudPlatform CloudPlatformType = "AWS"
	GcpCloudPlatform CloudPlatformType = "GCP"
)

func (CloudPlatformType) String added in v1.1.2

func (c CloudPlatformType) String() string

type Config

type Config struct {
	CloudPlatform string `yaml:"CloudPlatform"`
	NoCrunchErr   bool   `yaml:"NoCrunchErr"`
}

func (Config) Validate

func (c Config) Validate() error

type Session

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

func (*Session) Context

func (s *Session) Context() context.Context

func (*Session) DoAwsRequest

func (sess *Session) DoAwsRequest(req *http.Request) (*http.Response, bool, error)

DoAwsRequest makes a request to AWS Does a request to the source bucket and if it returns 404, tries the crunched bucket Returns the response and a boolean indicating if the response is from the crunched bucket

func (*Session) DoRequest

func (sess *Session) DoRequest(req *http.Request) (*http.Response, bool, error)

DoRequest makes a request to the cloud platform Does a request to the source bucket and if it returns 404, tries the crunched bucket Returns the response and a boolean indicating if the response is from the crunched bucket

func (*Session) Logger

func (s *Session) Logger() *zap.Logger

func (*Session) WithContext

func (s *Session) WithContext(ctx context.Context) *Session

func (*Session) WithLogger

func (s *Session) WithLogger(logger *zap.Logger) *Session

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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