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.
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.
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
- func GetBlobDigest(path string) (core.Digest, error)
- func GetLayerDigest(path string) (core.Digest, error)
- func GetManifestDigest(path string) (core.Digest, error)
- func GetManifestTag(path string) (string, bool, error)
- func GetRepo(path string) (string, error)
- func GetUploadAlgoAndOffset(path string) (string, string, error)
- func GetUploadUUID(path string) (string, error)
- func ParsePath(path string) (PathType, PathSubType, error)
- type BlobStore
- type Config
- func (c Config) Build(parameters configuration.Parameters) (*registry.Registry, error)
- func (c Config) ReadOnlyParameters(transferer transfer.ImageTransferer, bs BlobStore, metrics tally.Scope) configuration.Parameters
- func (c Config) ReadWriteParameters(transferer transfer.ImageTransferer, cas *store.CAStore, metrics tally.Scope) configuration.Parameters
- type InvalidRegistryPathError
- type InvalidRequestError
- type KrakenStorageDriver
- func NewReadOnlyStorageDriver(config Config, bs BlobStore, transferer transfer.ImageTransferer, ...) *KrakenStorageDriver
- func NewReadWriteStorageDriver(config Config, cas *store.CAStore, transferer transfer.ImageTransferer, ...) *KrakenStorageDriver
- func StorageDriverFixture() (*KrakenStorageDriver, func())
- func (d *KrakenStorageDriver) Delete(ctx context.Context, path string) error
- func (d *KrakenStorageDriver) GetContent(ctx context.Context, path string) (data []byte, err error)
- func (d *KrakenStorageDriver) List(ctx context.Context, path string) ([]string, error)
- func (d *KrakenStorageDriver) Move(ctx context.Context, sourcePath string, destPath string) error
- func (d *KrakenStorageDriver) Name() string
- func (d *KrakenStorageDriver) PutContent(ctx context.Context, path string, content []byte) error
- func (d *KrakenStorageDriver) Reader(ctx context.Context, path string, offset int64) (reader io.ReadCloser, err error)
- func (d *KrakenStorageDriver) Stat(ctx context.Context, path string) (driver.FileInfo, error)
- func (d *KrakenStorageDriver) URLFor(ctx context.Context, path string, options map[string]interface{}) (string, error)
- func (d *KrakenStorageDriver) Walk(ctx context.Context, path string, f driver.WalkFn) error
- func (d *KrakenStorageDriver) Writer(ctx context.Context, path string, append bool) (driver.FileWriter, error)
- type PathSubType
- type PathType
Constants ¶
const Name = "kraken"
Name of storage driver.
Variables ¶
This section is empty.
Functions ¶
func GetBlobDigest ¶
GetBlobDigest returns blob digest
func GetLayerDigest ¶
GetLayerDigest returns digest of the layer
func GetManifestDigest ¶
GetManifestDigest returns manifest or tag digest
func GetManifestTag ¶
GetManifestTag returns tag name
func GetUploadAlgoAndOffset ¶
GetUploadAlgoAndOffset returns the algorithm and offset of the hashstates
func GetUploadUUID ¶
GetUploadUUID returns upload UUID
func ParsePath ¶
func ParsePath(path string) (PathType, PathSubType, error)
ParsePath returns PathType, PathSubtype, and error given path string
Types ¶
type BlobStore ¶
type BlobStore interface { GetCacheFileStat(name string) (os.FileInfo, error) GetCacheFileReader(name string) (store.FileReader, error) }
BlobStore defines cache file accessors.
type Config ¶
type Config struct {
Docker configuration.Configuration `yaml:"docker"`
}
Config defines registry configuration.
func (Config) Build ¶
func (c Config) Build(parameters configuration.Parameters) (*registry.Registry, error)
Build builds a new docker registry.
func (Config) ReadOnlyParameters ¶
func (c Config) ReadOnlyParameters( transferer transfer.ImageTransferer, bs BlobStore, metrics tally.Scope) configuration.Parameters
ReadOnlyParameters builds parameters for a read-only driver.
func (Config) ReadWriteParameters ¶
func (c Config) ReadWriteParameters( transferer transfer.ImageTransferer, cas *store.CAStore, metrics tally.Scope) configuration.Parameters
ReadWriteParameters builds parameters for a read-write driver.
type InvalidRegistryPathError ¶
type InvalidRegistryPathError struct {
// contains filtered or unexported fields
}
InvalidRegistryPathError indicates path error
func (InvalidRegistryPathError) Error ¶
func (e InvalidRegistryPathError) Error() string
type InvalidRequestError ¶
type InvalidRequestError struct {
// contains filtered or unexported fields
}
InvalidRequestError implements error and contains the path that is not supported
func (InvalidRequestError) Error ¶
func (e InvalidRequestError) Error() string
type KrakenStorageDriver ¶
type KrakenStorageDriver struct {
// contains filtered or unexported fields
}
KrakenStorageDriver is a storage driver
func NewReadOnlyStorageDriver ¶
func NewReadOnlyStorageDriver( config Config, bs BlobStore, transferer transfer.ImageTransferer, metrics tally.Scope) *KrakenStorageDriver
NewReadOnlyStorageDriver creates a KrakenStorageDriver which can only pull blobs.
func NewReadWriteStorageDriver ¶
func NewReadWriteStorageDriver( config Config, cas *store.CAStore, transferer transfer.ImageTransferer, metrics tally.Scope) *KrakenStorageDriver
NewReadWriteStorageDriver creates a KrakenStorageDriver which can push / pull blobs.
func StorageDriverFixture ¶
func StorageDriverFixture() (*KrakenStorageDriver, func())
StorageDriverFixture creates a storage driver for testing purposes.
func (*KrakenStorageDriver) Delete ¶
func (d *KrakenStorageDriver) Delete(ctx context.Context, path string) error
Delete deletes path
func (*KrakenStorageDriver) GetContent ¶
GetContent returns content in the path sample path: /docker/registry/v2/repositories/external/ubuntu/_layers/sha256/a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4/link
func (*KrakenStorageDriver) List ¶
List returns a list of content given path
func (*KrakenStorageDriver) Move ¶
Move moves sourcePath to destPath
func (*KrakenStorageDriver) Name ¶
func (d *KrakenStorageDriver) Name() string
Name returns driver namae
func (*KrakenStorageDriver) PutContent ¶
PutContent writes content to path
func (*KrakenStorageDriver) Reader ¶
func (d *KrakenStorageDriver) Reader(ctx context.Context, path string, offset int64) (reader io.ReadCloser, err error)
Reader returns a reader of path at offset
func (*KrakenStorageDriver) Stat ¶
Stat returns fileinfo of path
func (*KrakenStorageDriver) URLFor ¶
func (d *KrakenStorageDriver) URLFor(ctx context.Context, path string, options map[string]interface{}) (string, error)
URLFor returns url for path
func (*KrakenStorageDriver) Walk ¶ added in v0.1.2
Walk is not implemented.
func (*KrakenStorageDriver) Writer ¶
func (d *KrakenStorageDriver) Writer(ctx context.Context, path string, append bool) (driver.FileWriter, error)
Writer returns a writer of path