Documentation ¶
Index ¶
- Constants
- Variables
- func ConfigOriginTTLCache(ctx context.Context, egrp *errgroup.Group)
- func ConfigureXrootdMonitoringDir() error
- func FetchAndSetRegStatus(prefixes ...string) error
- func FetchRegStatus(prefixes []string) (*server_structs.CheckNamespaceCompleteRes, error)
- func LaunchBrokerListener(ctx context.Context, egrp *errgroup.Group) (err error)
- func LaunchOriginFileTestMaintenance(ctx context.Context)
- func PeriodicSelfTest(ctx context.Context) error
- func RegisterOriginAPI(router *gin.Engine, ctx context.Context, egrp *errgroup.Group) error
- func RegisterOriginWebAPI(engine *gin.Engine)
- func SetNamespacesStatus(key string, val RegistrationStatus, ttl time.Duration)
- type OriginServer
- func (server *OriginServer) CreateAdvertisement(name, originUrlStr, originWebUrl string) (*server_structs.OriginAdvertiseV2, error)
- func (server *OriginServer) GetAuthorizedPrefixes() ([]string, error)
- func (server *OriginServer) GetNamespaceAdsFromDirector() error
- func (server *OriginServer) GetPids() (pids []int)
- func (server *OriginServer) GetServerType() config.ServerType
- func (server *OriginServer) SetPids(pids []int)
- type RegistrationStatus
Constants ¶
const ( RegStatusNotSupported regStatusEnum = "Not Supported" // Registry does not support this function RegCompleted regStatusEnum = "Completed" // Registration is completed RegIncomplete regStatusEnum = "Incomplete" // Registered, but registration is incomplete RegError regStatusEnum = "Registration Error" // Failed to register )
Variables ¶
var RegistryNotImplErr = errors.New("the running version of the registry didn't implmenet this function")
Functions ¶
func ConfigureXrootdMonitoringDir ¶
func ConfigureXrootdMonitoringDir() error
Configure XrootD directory for both self-based and director-based file transfer tests
func FetchAndSetRegStatus ¶
Fetch the registration status, generate access token for editing the registration at the registry, and store the status to the TTL cache
func FetchRegStatus ¶
func FetchRegStatus(prefixes []string) (*server_structs.CheckNamespaceCompleteRes, error)
Fetch the registration status for an array of namespace prefixes from the registry
func LaunchBrokerListener ¶
Launch goroutines that continuously poll the broker
func LaunchOriginFileTestMaintenance ¶
Remove tmp files under ${Origin_RunLocation}/export/pelican/monitoring from diector-based/self tests. There could be dangling files due to error in testing
func PeriodicSelfTest ¶
Start self-test monitoring of the origin. This will upload, download, and delete a generated filename every 15 seconds to the local origin. On failure, it will set the xrootd component's status to critical.
func RegisterOriginAPI ¶
Configure API endpoints for origin that are not tied to UI
func RegisterOriginWebAPI ¶
func SetNamespacesStatus ¶
func SetNamespacesStatus(key string, val RegistrationStatus, ttl time.Duration)
Types ¶
type OriginServer ¶
type OriginServer struct { server_structs.NamespaceHolder // contains filtered or unexported fields }
func (*OriginServer) CreateAdvertisement ¶
func (server *OriginServer) CreateAdvertisement(name, originUrlStr, originWebUrl string) (*server_structs.OriginAdvertiseV2, error)
func (*OriginServer) GetAuthorizedPrefixes ¶
func (server *OriginServer) GetAuthorizedPrefixes() ([]string, error)
Return a list of paths where the origin's issuer is authoritative.
Used to calculate the base_paths in the scitokens.cfg, for eaxmple
func (*OriginServer) GetNamespaceAdsFromDirector ¶
func (server *OriginServer) GetNamespaceAdsFromDirector() error
func (*OriginServer) GetPids ¶
func (server *OriginServer) GetPids() (pids []int)
func (*OriginServer) GetServerType ¶
func (server *OriginServer) GetServerType() config.ServerType
func (*OriginServer) SetPids ¶
func (server *OriginServer) SetPids(pids []int)
type RegistrationStatus ¶
For TTL cache to keep track of namespace registration status