Documentation ¶
Overview ¶
Copyright (c) 2016-2019 Uber Technologies, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) 2016-2019 Uber Technologies, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) 2016-2019 Uber Technologies, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrTagNotFound = errors.New("tag not found")
)
Client errors.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Put(tag string, d core.Digest) error PutAndReplicate(tag string, d core.Digest) error Get(tag string) (core.Digest, error) Has(tag string) (bool, error) List(prefix string) ([]string, error) ListWithPagination(prefix string, filter ListFilter) (tagmodels.ListResponse, error) ListRepository(repo string) ([]string, error) ListRepositoryWithPagination(repo string, filter ListFilter) (tagmodels.ListResponse, error) Replicate(tag string) error Origin() (string, error) DuplicateReplicate( tag string, d core.Digest, dependencies core.DigestList, delay time.Duration) error DuplicatePut(tag string, d core.Digest, delay time.Duration) error }
Client wraps tagserver endpoints.
func NewClusterClient ¶
func NewClusterClient(hosts healthcheck.List, config *tls.Config) Client
NewClusterClient creates a Client which operates on tagserver instances as a cluster.
type DuplicatePutRequest ¶
DuplicatePutRequest defines a DuplicatePut request body.
type DuplicateReplicateRequest ¶
type DuplicateReplicateRequest struct { Dependencies core.DigestList `json:"dependencies"` Delay time.Duration `json:"delay"` }
DuplicateReplicateRequest defines a DuplicateReplicate request body.
type ListFilter ¶ added in v0.1.3
ListFilter contains filter request for list with pagination operations.
type Provider ¶
Provider maps addresses into Clients.
func NewProvider ¶
NewProvider creates a Provider which wraps NewSingleClient.
type ReplicateRequest ¶
ReplicateRequest defines a Replicate request body.
type TestProvider ¶
type TestProvider struct {
// contains filtered or unexported fields
}
TestProvider is a testing utility for mapping addresses to mock clients.
func NewTestProvider ¶
func NewTestProvider() *TestProvider
NewTestProvider creates a new TestProvider.
func (*TestProvider) Provide ¶
func (p *TestProvider) Provide(addr string) Client
Provide selects the registered client of addr.
func (*TestProvider) Register ¶
func (p *TestProvider) Register(addr string, c Client)
Register sets c as the client of addr.