resolver

package
v2.8.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(config storage.ProviderConfig) (*providerClientService, *providerResolver, error)

Build constructs the cp client service and provider resolver from runtime configuration.

func NewProvider

func NewProvider(ctx context.Context, provider storage.ProviderType, providers storage.Providers, opts ...BuilderOption) (storage.Provider, error)

NewProvider builds one storage provider from the provider set, selecting the entry for the provider type

func NewServiceFromConfig

func NewServiceFromConfig(config storage.ProviderConfig, opts ...Option) (*objects.Service, error)

NewServiceFromConfig constructs a storage service complete with resolver rules derived from runtime configuration.

Types

type BuilderOption

type BuilderOption func(*providerBuilders)

BuilderOption customises the provider builders NewProvider selects from

func WithGCSOptions

func WithGCSOptions(opts ...gcs.Option) BuilderOption

WithGCSOptions applies provider options to the GCS builder

func WithR2Options

func WithR2Options(opts ...r2provider.Option) BuilderOption

WithR2Options applies provider options to the R2 builder

func WithS3Options

func WithS3Options(opts ...s3provider.Option) BuilderOption

WithS3Options applies provider options to the S3 builder

type Option

type Option func(*serviceOptions)

func WithPresignBaseURL

func WithPresignBaseURL(baseURL string) Option

WithPresignBaseURL configures the base URL for presigned download URLs.

func WithPresignConfig

func WithPresignConfig(tokenManager func() *tokens.TokenManager, issuer, audience string) Option

WithPresignConfig configures presigned URL token generation for providers that support it.

type RuleOption

type RuleOption func(*ruleCoordinator)

RuleOption configures aspects of ruleCoordinator

func WithProviderBuilders

func WithProviderBuilders(builders providerBuilders) RuleOption

WithProviderBuilders supplies the provider builders used for rule resolution.

func WithProviderConfig

func WithProviderConfig(config storage.ProviderConfig) RuleOption

WithProviderConfig supplies the provider configuration used when resolving options.

func WithRuntimeOptions

func WithRuntimeOptions(runtime serviceOptions) RuleOption

WithRuntimeOptions supplies runtime configuration such as token manager hooks.

Jump to

Keyboard shortcuts

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