Documentation
¶
Index ¶
- Variables
- func NewConnectorRunner(ctx context.Context, c types.ConnectorServer, opts ...Option) (*connectorRunner, error)
- type Option
- func WithClientCredentials(clientID string, clientSecret string) Option
- func WithExternalLimiter(address string, opts map[string]string) Option
- func WithFixedMemoryLimiter(rate int64, period time.Duration) Option
- func WithOnDemandGrant(c1zPath string, entitlementID string, principalID string, principalType string) Option
- func WithOnDemandRevoke(c1zPath string, grantID string) Option
- func WithOnDemandSync(c1zPath string) Option
- func WithProvisioningEnabled() Option
- func WithRateLimitDescriptor(entry *ratelimitV1.RateLimitDescriptors_Entry) Option
- func WithRateLimiterConfig(cfg *ratelimitV1.RateLimiterConfig) Option
- func WithSlidingMemoryLimiter(usePercent int64) Option
Constants ¶
This section is empty.
Variables ¶
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 ¶
func WithClientCredentials ¶
func WithExternalLimiter ¶
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 ¶
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 WithOnDemandGrant ¶
func WithOnDemandRevoke ¶
func WithOnDemandSync ¶
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 ¶
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.