Documentation
¶
Index ¶
- Variables
- func ExtractDefaultCapabilitiesConnectorFactory(ctx context.Context, options ...Option) (func(ctx context.Context) (types.ConnectorServer, error), error)
- func ExtractDefaultConnector(ctx context.Context, options ...Option) (any, error)
- func IsSessionStoreEnabled(ctx context.Context, options ...Option) (bool, error)
- func NewConnectorRunner(ctx context.Context, c types.ConnectorServer, opts ...Option) (*connectorRunner, error)
- type Option
- func WithActionsEnabled() Option
- func WithBulkCreateTicket(templatePath string) Option
- func WithClientCredentials(clientID string, clientSecret string) Option
- func WithCreateTicket(templatePath string) Option
- func WithDefaultCapabilitiesConnectorBuilder(t connectorbuilder.ConnectorBuilder) Option
- func WithDefaultCapabilitiesConnectorBuilderV2(t connectorbuilder.ConnectorBuilderV2) Option
- func WithDefaultCapabilitiesConnectorFactory(f func(ctx context.Context) (types.ConnectorServer, error)) Option
- func WithDiffSyncs(c1zPath string, baseSyncID string, newSyncID string) Option
- func WithExternalLimiter(address string, opts map[string]string) Option
- func WithExternalResourceC1Z(externalResourceC1Z string) Option
- func WithExternalResourceEntitlementFilter(entitlementId string) Option
- func WithFixedMemoryLimiter(rate int64, period time.Duration) Option
- func WithFullSyncDisabled() Option
- func WithGetTicket(ticketID string) Option
- func WithHealthCheck(enabled bool, port int, bindAddress string) Option
- func WithListTicketSchemas() Option
- func WithOnDemandCreateAccount(c1zPath string, login string, email string, profile *structpb.Struct, ...) Option
- func WithOnDemandDeleteResource(c1zPath string, resourceId string, resourceType string) Option
- func WithOnDemandEventStream(feedId string, startAt time.Time, cursor string) Option
- func WithOnDemandGrant(c1zPath string, entitlementID string, principalID string, principalType string) Option
- func WithOnDemandInvokeAction(c1zPath string, action string, resourceTypeID string, args *structpb.Struct) Option
- func WithOnDemandListActionSchemas(c1zPath string, resourceTypeID string) Option
- func WithOnDemandRevoke(c1zPath string, grantID string) Option
- func WithOnDemandRotateCredentials(c1zPath string, resourceId string, resourceType string) Option
- func WithOnDemandSync(c1zPath string) Option
- func WithProvisioningEnabled() Option
- func WithRateLimitDescriptor(entry *ratelimitV1.RateLimitDescriptors_Entry) Option
- func WithRateLimiterConfig(cfg *ratelimitV1.RateLimiterConfig) Option
- func WithSessionStoreEnabled() Option
- func WithSkipEntitlementsAndGrants(skip bool) Option
- func WithSkipGrants(skip bool) Option
- func WithSlidingMemoryLimiter(usePercent int64) Option
- func WithSyncCompactor(outputPath string, filePaths []string, syncIDs []string) Option
- func WithSyncResourceTypeIDs(resourceTypeIDs []string) Option
- func WithTargetedSyncResources(resourceIDs []string) Option
- func WithTaskConcurrency(n int) Option
- func WithTempDir(tempDir string) Option
- func WithTicketingEnabled() Option
- func WithWorkerCount(workerCount int) Option
Constants ¶
This section is empty.
Variables ¶
var ErrSigTerm = errors.New("context cancelled by process shutdown")
Functions ¶
func ExtractDefaultCapabilitiesConnectorFactory ¶ added in v0.12.6
func ExtractDefaultCapabilitiesConnectorFactory(ctx context.Context, options ...Option) (func(ctx context.Context) (types.ConnectorServer, error), error)
ExtractDefaultCapabilitiesConnectorFactory returns the factory registered via WithDefaultCapabilitiesConnectorFactory, or nil if none was set.
func ExtractDefaultConnector ¶ added in v0.7.2
func IsSessionStoreEnabled ¶ added in v0.5.7
func NewConnectorRunner ¶
func NewConnectorRunner(ctx context.Context, c types.ConnectorServer, opts ...Option) (*connectorRunner, error)
NewConnectorRunner creates a new connector runner.
Types ¶
type Option ¶
func WithActionsEnabled ¶ added in v0.3.25
func WithActionsEnabled() Option
func WithBulkCreateTicket ¶ added in v0.2.43
func WithClientCredentials ¶
func WithCreateTicket ¶ added in v0.1.36
func WithDefaultCapabilitiesConnectorBuilder ¶ added in v0.7.2
func WithDefaultCapabilitiesConnectorBuilder(t connectorbuilder.ConnectorBuilder) Option
WithDefaultCapabilitiesConnectorBuilder sets the default connector builder for the runner This is used by the "capabilities" sub-command to instantiate the connector.
func WithDefaultCapabilitiesConnectorBuilderV2 ¶ added in v0.7.2
func WithDefaultCapabilitiesConnectorBuilderV2(t connectorbuilder.ConnectorBuilderV2) Option
WithDefaultCapabilitiesConnectorBuilderV2 sets the default connector builder for the runner This is used by the "capabilities" sub-command to instantiate the connector.
func WithDefaultCapabilitiesConnectorFactory ¶ added in v0.12.6
func WithDefaultCapabilitiesConnectorFactory(f func(ctx context.Context) (types.ConnectorServer, error)) Option
WithDefaultCapabilitiesConnectorFactory sets a factory that supplies the connector used by the "capabilities" sub-command. Unlike WithDefaultCapabilitiesConnectorBuilder, the factory returns a fully-constructed types.ConnectorServer directly, so the connector is not wrapped by connectorbuilder.NewConnector. This lets callers provide a connector (such as an embedded connector) whose capabilities are reported via GetMetadata rather than via the optional GetCapabilities getter.
The factory is only invoked inside the capabilities command, and its returned connector is closed (if it implements Close) once capabilities have been read.
func WithDiffSyncs ¶ added in v0.3.2
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 WithExternalResourceC1Z ¶ added in v0.2.84
func WithExternalResourceEntitlementFilter ¶ added in v0.2.84
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 WithFullSyncDisabled ¶ added in v0.2.15
func WithFullSyncDisabled() Option
func WithGetTicket ¶ added in v0.1.36
func WithHealthCheck ¶ added in v0.7.6
WithHealthCheck enables the HTTP health check server.
func WithListTicketSchemas ¶ added in v0.1.36
func WithListTicketSchemas() Option
func WithOnDemandCreateAccount ¶ added in v0.1.15
func WithOnDemandDeleteResource ¶ added in v0.1.15
func WithOnDemandEventStream ¶ added in v0.1.16
func WithOnDemandGrant ¶
func WithOnDemandInvokeAction ¶ added in v0.3.25
func WithOnDemandInvokeAction(c1zPath string, action string, resourceTypeID string, args *structpb.Struct) Option
WithOnDemandInvokeAction creates an option for invoking an action. If resourceTypeID is provided, it invokes a resource-scoped action.
func WithOnDemandListActionSchemas ¶ added in v0.6.9
WithOnDemandListActionSchemas creates an option for listing action schemas. If resourceTypeID is provided, it filters schemas for that specific resource type.
func WithOnDemandRevoke ¶
func WithOnDemandRotateCredentials ¶ added in v0.1.15
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 WithSessionStoreEnabled ¶ added in v0.5.0
func WithSessionStoreEnabled() Option
func WithSkipEntitlementsAndGrants ¶ added in v0.3.40
func WithSkipGrants ¶ added in v0.5.1
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.
func WithSyncCompactor ¶ added in v0.3.3
func WithSyncResourceTypeIDs ¶ added in v0.5.0
func WithTargetedSyncResources ¶ added in v0.6.6
func WithTaskConcurrency ¶ added in v0.9.1
WithTaskConcurrency sets how many Baton tasks may run concurrently in service mode. n uses the same raw sentinels as sync workers: -1 for auto-detect, 0 for sequential, and >0 for that many concurrent tasks.
func WithTempDir ¶ added in v0.1.8
func WithTicketingEnabled ¶ added in v0.1.36
func WithTicketingEnabled() Option