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 DeleteAllStagesResponse
- type DeleteStagesBySignatureRequest
- type DeleteStagesBySignatureResponse
- type GetAllStagesRequest
- type GetAllStagesResponse
- type GetStagesBySignatureRequest
- type GetStagesBySignatureResponse
- type HealthRequest
- type HealthResponse
- type NewClientIDRequest
- type NewClientIDResponse
- type StagesStorageCacheHttpClient
- func (client *StagesStorageCacheHttpClient) DeleteAllStages(_ context.Context, projectName string) error
- func (client *StagesStorageCacheHttpClient) DeleteStagesBySignature(_ context.Context, projectName, signature string) error
- func (client *StagesStorageCacheHttpClient) GetAllStages(_ context.Context, projectName string) (bool, []image.StageID, error)
- func (client *StagesStorageCacheHttpClient) GetStagesBySignature(_ context.Context, projectName, signature string) (bool, []image.StageID, error)
- func (client *StagesStorageCacheHttpClient) StoreStagesBySignature(_ context.Context, projectName, signature string, stages []image.StageID) error
- func (client *StagesStorageCacheHttpClient) String() string
- type StagesStorageCacheHttpHandler
- type StoreStagesBySignatureRequest
- type StoreStagesBySignatureResponse
- 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 DeleteAllStagesResponse ¶
type DeleteAllStagesResponse struct {
Err util.SerializableError `json:"err"`
}
type DeleteStagesBySignatureResponse ¶
type DeleteStagesBySignatureResponse struct {
Err util.SerializableError `json:"err"`
}
type GetAllStagesRequest ¶
type GetAllStagesRequest 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 GetStagesBySignatureResponse ¶
type GetStagesBySignatureResponse struct {
Err util.SerializableError `json:"err"`
Found bool `json:"found"`
Stages []image.StageID `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 StagesStorageCacheHttpClient ¶
func NewStagesStorageCacheHttpClient ¶
func NewStagesStorageCacheHttpClient(url string) *StagesStorageCacheHttpClient
func (*StagesStorageCacheHttpClient) DeleteAllStages ¶
func (client *StagesStorageCacheHttpClient) DeleteAllStages(_ context.Context, projectName string) error
func (*StagesStorageCacheHttpClient) DeleteStagesBySignature ¶
func (client *StagesStorageCacheHttpClient) DeleteStagesBySignature(_ context.Context, projectName, signature string) error
func (*StagesStorageCacheHttpClient) GetAllStages ¶
func (*StagesStorageCacheHttpClient) GetStagesBySignature ¶
func (*StagesStorageCacheHttpClient) StoreStagesBySignature ¶
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 StoreStagesBySignatureResponse ¶
type StoreStagesBySignatureResponse 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.