Documentation ¶
Index ¶
- Variables
- func AdvertiseOSDF() error
- func ConfigFilterdServers()
- func InitializeDB(ctx context.Context)
- func LaunchMapMetrics(ctx context.Context, egrp *errgroup.Group)
- func LaunchPeriodicDirectorTest(ctx context.Context, serverAd server_structs.ServerAd)
- func LaunchTTLCache(ctx context.Context, egrp *errgroup.Group)
- func PeriodicCacheReload(ctx context.Context)
- func RegisterDirectorAPI(ctx context.Context, router *gin.RouterGroup)
- func RegisterDirectorOIDCAPI(router *gin.RouterGroup)
- func RegisterDirectorWebAPI(router *gin.RouterGroup)
- func ShortcutMiddleware(defaultResponse string) gin.HandlerFunc
- type Coordinate
- type GeoIPOverride
- type HealthTestStatus
- type ObjectStat
- type PromDiscoveryItem
- type SwapMap
- type SwapMaps
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ConfigFilterdServers ¶
func ConfigFilterdServers()
Populate internal filteredServers map by Director.FilteredServers
func InitializeDB ¶
func LaunchMapMetrics ¶
Launch a goroutine to scrape metrics from various TTL caches and maps in the director
func LaunchPeriodicDirectorTest ¶
func LaunchPeriodicDirectorTest(ctx context.Context, serverAd server_structs.ServerAd)
Run a periodic test file transfer against an origin to ensure it's talking to the director
func LaunchTTLCache ¶
Configure TTL caches to enable cache eviction and other additional cache events handling logic
The `ctx` is the context for listening to server shutdown event in order to cleanup internal cache eviction goroutine
func PeriodicCacheReload ¶
func RegisterDirectorAPI ¶
func RegisterDirectorAPI(ctx context.Context, router *gin.RouterGroup)
func RegisterDirectorOIDCAPI ¶
func RegisterDirectorOIDCAPI(router *gin.RouterGroup)
func RegisterDirectorWebAPI ¶ added in v1.0.4
func RegisterDirectorWebAPI(router *gin.RouterGroup)
func ShortcutMiddleware ¶
func ShortcutMiddleware(defaultResponse string) gin.HandlerFunc
Middleware sends GET /foo/bar to the RedirectToCache function, as if the original request had been made to /api/v1.0/director/object/foo/bar
Types ¶
type Coordinate ¶
type GeoIPOverride ¶
type GeoIPOverride struct { IP string `mapstructure:"IP"` Coordinate Coordinate `mapstructure:"Coordinate"` }
type HealthTestStatus ¶
type HealthTestStatus string
status of director-based health tests to origins and caches
const ( HealthStatusUnknown HealthTestStatus = "Unknown" HealthStatusInit HealthTestStatus = "Initializing" HealthStatusOK HealthTestStatus = "OK" HealthStatusError HealthTestStatus = "Error" )
type ObjectStat ¶
type ObjectStat struct { ReqHandler func(objectName string, dataUrl url.URL, timeout time.Duration, maxCancelCtx context.Context) (*objectMetadata, error) Query func(objectName string, cancelContext context.Context, mininum, maximum int) ([]*objectMetadata, string, error) }
A struct to implement `object stat`, by querying against origins with namespaces match the prefix of an object name and return origins that have the object
func NewObjectStat ¶
func NewObjectStat() *ObjectStat
Initialize a new stat instance and set default method implementations
type PromDiscoveryItem ¶ added in v1.0.4
type PromDiscoveryItem struct { Targets []string `json:"targets"` Labels map[string]string `json:"labels"` }
Prometheus HTTP discovery endpoint struct, used by director to dynamically return available origin/cache servers for Prometheus to scrape