Documentation ¶
Index ¶
- func GetOrCreateClientID(ctx context.Context, projectName string, ...) (string, error)
- func HandleRequest(w http.ResponseWriter, r *http.Request, request, response interface{}, ...)
- func PerformPost(client *http.Client, url string, request, response interface{}) error
- func RunSynchronizationServer(_ context.Context, ip, port string, ...) error
- type DeleteAllStagesRequest
- type DeleteAllStagesRequestLegacy
- type DeleteAllStagesResponse
- type DeleteAllStagesResponseLegacy
- type DeleteStagesByDigestRequest
- type DeleteStagesByDigestResponse
- type DeleteStagesBySignatureRequestLegacy
- type DeleteStagesBySignatureResponseLegacy
- type GetAllStagesRequest
- type GetAllStagesRequestLegacy
- type GetAllStagesResponse
- type GetAllStagesResponseLegacy
- type GetStagesByDigestRequest
- type GetStagesByDigestResponse
- type GetStagesBySignatureRequestLegacy
- type GetStagesBySignatureResponseLegacy
- type HealthRequest
- type HealthResponse
- type NewClientIDRequest
- type NewClientIDResponse
- type StageIDLegacy
- type StagesStorageCacheHttpClient
- func (client *StagesStorageCacheHttpClient) DeleteAllStages(_ context.Context, projectName string) error
- func (client *StagesStorageCacheHttpClient) DeleteStagesByDigest(_ context.Context, projectName, digest string) error
- func (client *StagesStorageCacheHttpClient) GetAllStages(_ context.Context, projectName string) (bool, []image.StageID, error)
- func (client *StagesStorageCacheHttpClient) GetStagesByDigest(_ context.Context, projectName, digest string) (bool, []image.StageID, error)
- func (client *StagesStorageCacheHttpClient) StoreStagesByDigest(_ context.Context, projectName, digest string, stages []image.StageID) error
- func (client *StagesStorageCacheHttpClient) String() string
- type StagesStorageCacheHttpHandler
- type StagesStorageCacheHttpHandlerLegacy
- type StoreStagesByDigestRequest
- type StoreStagesByDigestResponse
- type StoreStagesBySignatureRequestLegacy
- type StoreStagesBySignatureResponseLegacy
- type SynchronizationClient
- type SynchronizationServerHandler
- type SynchronizationServerHandlerByClientID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOrCreateClientID ¶ added in v1.1.23
func GetOrCreateClientID(ctx context.Context, projectName string, synchronizationClient *SynchronizationClient, stagesStorage storage.StagesStorage) (string, error)
func HandleRequest ¶
func HandleRequest(w http.ResponseWriter, r *http.Request, request, response interface{}, actionFunc func())
func PerformPost ¶
func RunSynchronizationServer ¶
func RunSynchronizationServer(_ context.Context, ip, port string, distributedLockerBackendFactoryFunc func(clientID string) (distributed_locker.DistributedLockerBackend, error), stagesStorageCacheFactoryFunc func(clientID string) (storage.StagesStorageCache, error)) error
Types ¶
type DeleteAllStagesRequest ¶
type DeleteAllStagesRequest struct {
ProjectName string `json:"projectName"`
}
type DeleteAllStagesRequestLegacy ¶ added in v1.2.0
type DeleteAllStagesRequestLegacy struct {
ProjectName string `json:"projectName"`
}
type DeleteAllStagesResponse ¶
type DeleteAllStagesResponse struct {
Err util.SerializableError `json:"err"`
}
type DeleteAllStagesResponseLegacy ¶ added in v1.2.0
type DeleteAllStagesResponseLegacy struct {
Err util.SerializableError `json:"err"`
}
type DeleteStagesByDigestRequest ¶ added in v1.2.0
type DeleteStagesByDigestResponse ¶ added in v1.2.0
type DeleteStagesByDigestResponse struct {
Err util.SerializableError `json:"err"`
}
type DeleteStagesBySignatureRequestLegacy ¶ added in v1.2.0
type DeleteStagesBySignatureResponseLegacy ¶ added in v1.2.0
type DeleteStagesBySignatureResponseLegacy struct {
Err util.SerializableError `json:"err"`
}
type GetAllStagesRequest ¶
type GetAllStagesRequest struct {
ProjectName string `json:"projectName"`
}
type GetAllStagesRequestLegacy ¶ added in v1.2.0
type GetAllStagesRequestLegacy struct {
ProjectName string `json:"projectName"`
}
type GetAllStagesResponse ¶
type GetAllStagesResponse struct { Err util.SerializableError `json:"err"` Found bool `json:"found"` Stages []image.StageID `json:"stages"` }
type GetAllStagesResponseLegacy ¶ added in v1.2.0
type GetAllStagesResponseLegacy struct { Err util.SerializableError `json:"err"` Found bool `json:"found"` Stages []StageIDLegacy `json:"stages"` }
type GetStagesByDigestRequest ¶ added in v1.2.0
type GetStagesByDigestResponse ¶ added in v1.2.0
type GetStagesByDigestResponse struct { Err util.SerializableError `json:"err"` Found bool `json:"found"` Stages []image.StageID `json:"stages"` }
type GetStagesBySignatureRequestLegacy ¶ added in v1.2.0
type GetStagesBySignatureResponseLegacy ¶ added in v1.2.0
type GetStagesBySignatureResponseLegacy struct { Err util.SerializableError `json:"err"` Found bool `json:"found"` Stages []StageIDLegacy `json:"stages"` }
type HealthRequest ¶ added in v1.1.23
type HealthRequest struct {
Echo string `json:"echo"`
}
type HealthResponse ¶ added in v1.1.23
type HealthResponse struct { Err util.SerializableError `json:"err"` Echo string `json:"echo"` Status string `json:"status"` }
type NewClientIDRequest ¶ added in v1.1.23
type NewClientIDRequest struct{}
type NewClientIDResponse ¶ added in v1.1.23
type NewClientIDResponse struct { Err util.SerializableError `json:"err"` ClientID string `json:"clientID"` }
type StageIDLegacy ¶ added in v1.2.0
type StagesStorageCacheHttpClient ¶
func NewStagesStorageCacheHttpClient ¶
func NewStagesStorageCacheHttpClient(url string) *StagesStorageCacheHttpClient
func (*StagesStorageCacheHttpClient) DeleteAllStages ¶
func (client *StagesStorageCacheHttpClient) DeleteAllStages(_ context.Context, projectName string) error
func (*StagesStorageCacheHttpClient) DeleteStagesByDigest ¶ added in v1.2.0
func (client *StagesStorageCacheHttpClient) DeleteStagesByDigest(_ context.Context, projectName, digest string) error
func (*StagesStorageCacheHttpClient) GetAllStages ¶
func (*StagesStorageCacheHttpClient) GetStagesByDigest ¶ added in v1.2.0
func (*StagesStorageCacheHttpClient) StoreStagesByDigest ¶ added in v1.2.0
func (*StagesStorageCacheHttpClient) String ¶
func (client *StagesStorageCacheHttpClient) String() string
type StagesStorageCacheHttpHandler ¶
type StagesStorageCacheHttpHandler struct { *http.ServeMux StagesStorageCache storage.StagesStorageCache }
func NewStagesStorageCacheHttpHandler ¶
func NewStagesStorageCacheHttpHandler(stagesStorageCache storage.StagesStorageCache) *StagesStorageCacheHttpHandler
type StagesStorageCacheHttpHandlerLegacy ¶ added in v1.2.0
type StagesStorageCacheHttpHandlerLegacy struct { *http.ServeMux StagesStorageCache storage.StagesStorageCache }
func NewStagesStorageCacheHttpHandlerLegacy ¶ added in v1.2.0
func NewStagesStorageCacheHttpHandlerLegacy(stagesStorageCache storage.StagesStorageCache) *StagesStorageCacheHttpHandlerLegacy
type StoreStagesByDigestRequest ¶ added in v1.2.0
type StoreStagesByDigestResponse ¶ added in v1.2.0
type StoreStagesByDigestResponse struct {
Err util.SerializableError `json:"err"`
}
type StoreStagesBySignatureRequestLegacy ¶ added in v1.2.0
type StoreStagesBySignatureRequestLegacy struct { ProjectName string `json:"projectName"` Signature string `json:"signature"` Stages []StageIDLegacy `json:"stages"` }
type StoreStagesBySignatureResponseLegacy ¶ added in v1.2.0
type StoreStagesBySignatureResponseLegacy struct {
Err util.SerializableError `json:"err"`
}
type SynchronizationClient ¶ added in v1.1.23
func NewSynchronizationClient ¶ added in v1.1.23
func NewSynchronizationClient(url string) *SynchronizationClient
func (*SynchronizationClient) NewClientID ¶ added in v1.1.23
func (client *SynchronizationClient) NewClientID() (string, error)
type SynchronizationServerHandler ¶
type SynchronizationServerHandler struct { *http.ServeMux DistributedLockerBackendFactoryFunc func(clientID string) (distributed_locker.DistributedLockerBackend, error) StagesStorageCacheFactoryFunc func(clientID string) (storage.StagesStorageCache, error) SynchronizationServerByClientID map[string]*SynchronizationServerHandlerByClientID // contains filtered or unexported fields }
func NewSynchronizationServerHandler ¶
func NewSynchronizationServerHandler(distributedLockerBackendFactoryFunc func(clientID string) (distributed_locker.DistributedLockerBackend, error), stagesStorageCacheFactoryFunc func(requestID string) (storage.StagesStorageCache, error)) *SynchronizationServerHandler
type SynchronizationServerHandlerByClientID ¶
type SynchronizationServerHandlerByClientID struct { *http.ServeMux ClientID string DistributedLockerBackend distributed_locker.DistributedLockerBackend StagesStorageCache storage.StagesStorageCache }
func NewSynchronizationServerHandlerByClientID ¶
func NewSynchronizationServerHandlerByClientID(clientID string, distributedLockerBackend distributed_locker.DistributedLockerBackend, stagesStorageCache storage.StagesStorageCache) *SynchronizationServerHandlerByClientID
Click to show internal directories.
Click to hide internal directories.