datastore

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Copyright (c) YugaByte, 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.

Implementation of the datastore interface for when the relevant data files are hosted on an azure blob storage

Copyright (c) YugabyteDB, 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) YugabyteDB, 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.

Implementation of the datastore interface for when the relevant data files are hosted on an gcs bucket.

Copyright (c) YugabyteDB, 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.

Implementation of datastore for when the relevant data files are available on the same machine running yb-voyager.

Copyright (c) YugabyteDB, 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.

Implementation of the datastore interface for when the relevant data files are hosted on an s3 bucket.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzDataStore added in v1.4.0

type AzDataStore struct {
	// contains filtered or unexported fields
}

func NewAzDataStore added in v1.4.0

func NewAzDataStore(dataDir string) *AzDataStore

func (*AzDataStore) AbsolutePath added in v1.4.0

func (ds *AzDataStore) AbsolutePath(filePath string) (string, error)

No-op for Azure URLs.

func (*AzDataStore) FileSize added in v1.4.0

func (ds *AzDataStore) FileSize(filePath string) (int64, error)

func (*AzDataStore) Glob added in v1.4.0

func (ds *AzDataStore) Glob(pattern string) ([]string, error)

Search and return all keys within the bucket matching the giving pattern.

func (*AzDataStore) Open added in v1.4.0

func (ds *AzDataStore) Open(objectPath string) (io.ReadCloser, error)

Open the file at the given path for reading.

type DataStore

type DataStore interface {
	Glob(string) ([]string, error)
	AbsolutePath(string) (string, error)
	FileSize(string) (int64, error)
	Open(string) (io.ReadCloser, error)
}

func NewDataStore

func NewDataStore(location string) DataStore

type GCSDataStore added in v1.4.0

type GCSDataStore struct {
	// contains filtered or unexported fields
}

func NewGCSDataStore added in v1.4.0

func NewGCSDataStore(resourceName string) *GCSDataStore

func (*GCSDataStore) AbsolutePath added in v1.4.0

func (ds *GCSDataStore) AbsolutePath(filePath string) (string, error)

No-op for GCS URLs.

func (*GCSDataStore) FileSize added in v1.4.0

func (ds *GCSDataStore) FileSize(filePath string) (int64, error)

func (*GCSDataStore) Glob added in v1.4.0

func (ds *GCSDataStore) Glob(pattern string) ([]string, error)

Search and return all keys within the bucket matching the giving pattern.

func (*GCSDataStore) Open added in v1.4.0

func (ds *GCSDataStore) Open(resourceName string) (io.ReadCloser, error)

type LocalDataStore

type LocalDataStore struct {
	// contains filtered or unexported fields
}

func NewLocalDataStore

func NewLocalDataStore(dataDir string) *LocalDataStore

func (*LocalDataStore) AbsolutePath

func (ds *LocalDataStore) AbsolutePath(file string) (string, error)

func (*LocalDataStore) FileSize

func (ds *LocalDataStore) FileSize(filePath string) (int64, error)

func (*LocalDataStore) Glob

func (ds *LocalDataStore) Glob(pattern string) ([]string, error)

Search and return all files in the dataDir matching the given pattern.

func (*LocalDataStore) Open

func (ds *LocalDataStore) Open(filePath string) (io.ReadCloser, error)

type S3DataStore

type S3DataStore struct {
	// contains filtered or unexported fields
}

func NewS3DataStore

func NewS3DataStore(resourceName string) *S3DataStore

func (*S3DataStore) AbsolutePath

func (ds *S3DataStore) AbsolutePath(filePath string) (string, error)

No-op for S3 URLs.

func (*S3DataStore) FileSize

func (ds *S3DataStore) FileSize(filePath string) (int64, error)

func (*S3DataStore) Glob

func (ds *S3DataStore) Glob(pattern string) ([]string, error)

Search and return all keys within the bucket matching the giving pattern.

func (*S3DataStore) Open

func (ds *S3DataStore) Open(resourceName string) (io.ReadCloser, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL