Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForEveryConfiguredGcpAccess ¶
func ForEveryConfiguredGcpAccess( supplier func(access *GcpAccess, ctx context.Context) ([]discovery_kit_api.Target, error), ctx context.Context, discovery string, ) ([]discovery_kit_api.Target, error)
ForEveryConfiguredGcpAccess fans the supplier out across all configured projects using config.WorkerThreads goroutines. Errors from the supplier are logged per-project and do not abort the overall discovery.
func InitializeGcpAccess ¶
func InitializeGcpAccess(spec config.Specification)
InitializeGcpAccess builds one GcpAccess per configured project. Must be called once after config.ValidateConfiguration. Projects whose client options fail to build are logged and skipped; the extension continues to operate with the remaining projects.
func SetProjectsForTest ¶
SetProjectsForTest replaces the internal projects map. Intended for tests only.
Types ¶
type GcpAccess ¶
type GcpAccess struct {
ProjectID string
ClientOptions []option.ClientOption
}
GcpAccess represents the configured access to a single GCP project, including any pre-built client options required to authenticate (impersonation token sources or keyfile credentials).
func GetGcpAccess ¶
GetGcpAccess returns the access entry for the given project ID, or an error if none is configured.