Documentation ¶
Index ¶
- type LocalResourcesService
- func (l *LocalResourcesService) ClearServiceResources(serviceName string)
- func (l *LocalResourcesService) Declare(ctx context.Context, req *resourcespb.ResourceDeclareRequest) (*resourcespb.ResourceDeclareResponse, error)
- func (l *LocalResourcesService) LogServiceError(serviceName string, err error)
- func (s *LocalResourcesService) SubscribeToState(fn func(lrs LocalResourcesState))
- type LocalResourcesState
- type NewServiceResourceRefresherArgs
- type ResourceName
- type ResourceRegister
- type ResourceRegistrar
- func (r *ResourceRegistrar[R]) ClearRequestingService(requestingService string)
- func (r *ResourceRegistrar[R]) Get(resourceName string) *R
- func (r *ResourceRegistrar[R]) GetAll() map[ResourceName]*ResourceRegister[R]
- func (r *ResourceRegistrar[R]) GetRequestingServices(name string) []string
- func (r *ResourceRegistrar[R]) Register(name string, requestingService string, resource *R) error
- type ServiceResourceRefresher
- type UpdateArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalResourcesService ¶
type LocalResourcesService struct {
// contains filtered or unexported fields
}
func NewLocalResourcesService ¶
func NewLocalResourcesService() *LocalResourcesService
func (*LocalResourcesService) ClearServiceResources ¶
func (l *LocalResourcesService) ClearServiceResources(serviceName string)
ClearServiceResources - Clear all resources registered by a service, typically done when the service terminates or is restarted
func (*LocalResourcesService) Declare ¶
func (l *LocalResourcesService) Declare(ctx context.Context, req *resourcespb.ResourceDeclareRequest) (*resourcespb.ResourceDeclareResponse, error)
func (*LocalResourcesService) LogServiceError ¶ added in v1.54.8
func (l *LocalResourcesService) LogServiceError(serviceName string, err error)
func (*LocalResourcesService) SubscribeToState ¶
func (s *LocalResourcesService) SubscribeToState(fn func(lrs LocalResourcesState))
type LocalResourcesState ¶
type LocalResourcesState struct { Buckets *ResourceRegistrar[resourcespb.BucketResource] BatchJobs *ResourceRegistrar[resourcespb.JobResource] KeyValueStores *ResourceRegistrar[resourcespb.KeyValueStoreResource] Policies *ResourceRegistrar[resourcespb.PolicyResource] Secrets *ResourceRegistrar[resourcespb.SecretResource] Topics *ResourceRegistrar[resourcespb.TopicResource] Queues *ResourceRegistrar[resourcespb.QueueResource] SqlDatabases *ResourceRegistrar[resourcespb.SqlDatabaseResource] ApiSecurityDefinitions *ResourceRegistrar[resourcespb.ApiSecurityDefinitionResource] ServiceErrors map[string][]error }
type NewServiceResourceRefresherArgs ¶
type NewServiceResourceRefresherArgs struct { Resources *LocalResourcesService Apis *apis.LocalApiGatewayService Schedules *schedules.LocalSchedulesService Http *http.LocalHttpProxy Listeners *storage.LocalStorageService Websockets *websockets.LocalWebsocketService Topics *topics.LocalTopicsAndSubscribersService Storage *storage.LocalStorageService BatchJobs *batch.LocalBatchService }
type ResourceName ¶
type ResourceName = string
type ResourceRegister ¶
type ResourceRegistrar ¶
type ResourceRegistrar[R any] struct { // contains filtered or unexported fields }
func NewResourceRegistrar ¶
func NewResourceRegistrar[R any]() *ResourceRegistrar[R]
func (*ResourceRegistrar[R]) ClearRequestingService ¶
func (r *ResourceRegistrar[R]) ClearRequestingService(requestingService string)
ClearRequestingService - Remove a requesting service from all resources, if it was the only requestor for a resource, the resource is also removed
func (*ResourceRegistrar[R]) Get ¶
func (r *ResourceRegistrar[R]) Get(resourceName string) *R
func (*ResourceRegistrar[R]) GetAll ¶
func (r *ResourceRegistrar[R]) GetAll() map[ResourceName]*ResourceRegister[R]
func (*ResourceRegistrar[R]) GetRequestingServices ¶
func (r *ResourceRegistrar[R]) GetRequestingServices(name string) []string
type ServiceResourceRefresher ¶
type ServiceResourceRefresher struct {
// contains filtered or unexported fields
}
func NewServiceResourceRefresher ¶
func NewServiceResourceRefresher(serviceName string, args NewServiceResourceRefresherArgs) (*ServiceResourceRefresher, error)
type UpdateArgs ¶
type UpdateArgs struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.