connectorrunner

package
v0.1.34 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSigTerm = errors.New("context cancelled by process shutdown")

Functions

func NewConnectorRunner

func NewConnectorRunner(ctx context.Context, c types.ConnectorServer, opts ...Option) (*connectorRunner, error)

NewConnectorRunner creates a new connector runner.

Types

type Option

type Option func(ctx context.Context, cfg *runnerConfig) error

func WithClientCredentials

func WithClientCredentials(clientID string, clientSecret string) Option

func WithExternalLimiter

func WithExternalLimiter(address string, opts map[string]string) Option

WithExternalLimiter configures the connector to use an external rate limiter. The `opts` map is injected into the environment in order for the service to be configured.

func WithFixedMemoryLimiter

func WithFixedMemoryLimiter(rate int64, period time.Duration) Option

WithFixedMemoryLimiter configures to use a fixed-memory limiter. `rate` is a number on how many times it should be in the given period executed. `period` represents the elapsed time between two instants as an int64 nanosecond count.

func WithOnDemandCreateAccount added in v0.1.15

func WithOnDemandCreateAccount(c1zPath string, login string, email string) Option

func WithOnDemandDeleteResource added in v0.1.15

func WithOnDemandDeleteResource(c1zPath string, resourceId string, resourceType string) Option

func WithOnDemandEventStream added in v0.1.16

func WithOnDemandEventStream() Option

func WithOnDemandGrant

func WithOnDemandGrant(c1zPath string, entitlementID string, principalID string, principalType string) Option

func WithOnDemandRevoke

func WithOnDemandRevoke(c1zPath string, grantID string) Option

func WithOnDemandRotateCredentials added in v0.1.15

func WithOnDemandRotateCredentials(c1zPath string, resourceId string, resourceType string) Option

func WithOnDemandSync

func WithOnDemandSync(c1zPath string) Option

func WithProvisioningEnabled

func WithProvisioningEnabled() Option

func WithRateLimitDescriptor

func WithRateLimitDescriptor(entry *ratelimitV1.RateLimitDescriptors_Entry) Option

WithRateLimitDescriptor takes a rate limit descriptor and adds it to the list of rate limit descriptors.

func WithRateLimiterConfig

func WithRateLimiterConfig(cfg *ratelimitV1.RateLimiterConfig) Option

WithRateLimiterConfig sets the RateLimiterConfig for a runner.

func WithSlidingMemoryLimiter

func WithSlidingMemoryLimiter(usePercent int64) Option

WithSlidingMemoryLimiter configures the connector to use an in-memory rate limiter that adjusts to maintain fairness based on request headers. `usePercent` is value between 0 and 100.

func WithTempDir added in v0.1.8

func WithTempDir(tempDir string) Option

Jump to

Keyboard shortcuts

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