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 StagesStorageCacheInterface
- 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) (StagesStorageCacheInterface, 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 StagesStorageCacheInterface }
func NewStagesStorageCacheHttpHandler ¶
func NewStagesStorageCacheHttpHandler(stagesStorageCache StagesStorageCacheInterface) *StagesStorageCacheHttpHandler
type StagesStorageCacheHttpHandlerLegacy ¶ added in v1.2.0
type StagesStorageCacheHttpHandlerLegacy struct { *http.ServeMux StagesStorageCache StagesStorageCacheInterface }
func NewStagesStorageCacheHttpHandlerLegacy ¶ added in v1.2.0
func NewStagesStorageCacheHttpHandlerLegacy(stagesStorageCache StagesStorageCacheInterface) *StagesStorageCacheHttpHandlerLegacy
type StagesStorageCacheInterface ¶ added in v1.2.77
type StagesStorageCacheInterface interface { GetAllStages(ctx context.Context, projectName string) (bool, []image.StageID, error) DeleteAllStages(ctx context.Context, projectName string) error GetStagesByDigest(ctx context.Context, projectName, digest string) (bool, []image.StageID, error) StoreStagesByDigest(ctx context.Context, projectName, digest string, stages []image.StageID) error DeleteStagesByDigest(ctx context.Context, projectName, digest string) error String() string }
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) (StagesStorageCacheInterface, 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) (StagesStorageCacheInterface, error)) *SynchronizationServerHandler
type SynchronizationServerHandlerByClientID ¶
type SynchronizationServerHandlerByClientID struct { *http.ServeMux ClientID string DistributedLockerBackend distributed_locker.DistributedLockerBackend StagesStorageCache StagesStorageCacheInterface }
func NewSynchronizationServerHandlerByClientID ¶
func NewSynchronizationServerHandlerByClientID(clientID string, distributedLockerBackend distributed_locker.DistributedLockerBackend, stagesStorageCache StagesStorageCacheInterface) *SynchronizationServerHandlerByClientID
Click to show internal directories.
Click to hide internal directories.