k8sblob

package module
v0.0.0-...-2a91c1c Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2019 License: MIT Imports: 22 Imported by: 0

README

k8sblob

This is currently an experiment

A gocloud blob implementation for storing objects in kubernetes via config maps

You can use it with your current go cloud project by importing the driver

import (
  _ "github.com/place1/k8sblob"
)

but why

I thought it'd be really cool to extend pulumi to be able to store it's statefiles in kubernetes natively via ConfigMap objects.

The motivation is to use pulumi with on-prem kubernetes clusters that don't have access to cloud object storage or the pulumi SaaS. Other use cases are to use pulumi with minikube locally.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Scheme = "kubernetes"

Functions

This section is empty.

Types

type Bucket

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

func (*Bucket) As

func (b *Bucket) As(i interface{}) bool

func (*Bucket) Attributes

func (b *Bucket) Attributes(ctx context.Context, key string) (*driver.Attributes, error)

func (*Bucket) Close

func (b *Bucket) Close() error

func (*Bucket) Copy

func (b *Bucket) Copy(ctx context.Context, dstKey, srcKey string, opts *driver.CopyOptions) error

func (*Bucket) Delete

func (b *Bucket) Delete(ctx context.Context, key string) error

func (*Bucket) ErrorAs

func (b *Bucket) ErrorAs(error, interface{}) bool

func (*Bucket) ErrorCode

func (b *Bucket) ErrorCode(err error) gcerrors.ErrorCode

func (*Bucket) ListPaged

func (b *Bucket) ListPaged(ctx context.Context, opts *driver.ListOptions) (*driver.ListPage, error)

func (*Bucket) NewRangeReader

func (b *Bucket) NewRangeReader(ctx context.Context, key string, offset int64, length int64, opts *driver.ReaderOptions) (driver.Reader, error)

func (*Bucket) NewTypedWriter

func (b *Bucket) NewTypedWriter(ctx context.Context, key string, contentType string, opts *driver.WriterOptions) (driver.Writer, error)

func (*Bucket) SignedURL

func (b *Bucket) SignedURL(ctx context.Context, key string, opts *driver.SignedURLOptions) (string, error)

type ConfigMapStorageReader

type ConfigMapStorageReader struct {
	io.Reader
	// contains filtered or unexported fields
}

func NewConfigMapStorageReader

func NewConfigMapStorageReader(client *kubernetes.Clientset, namespace string, name string, filename string) *ConfigMapStorageReader

func (*ConfigMapStorageReader) As

func (w *ConfigMapStorageReader) As(interface{}) bool

func (*ConfigMapStorageReader) Attributes

func (*ConfigMapStorageReader) Close

func (w *ConfigMapStorageReader) Close() error

func (*ConfigMapStorageReader) Read

func (w *ConfigMapStorageReader) Read(p []byte) (int, error)

type ConfigMapStorageWriter

type ConfigMapStorageWriter struct {
	io.Writer
	// contains filtered or unexported fields
}

func NewConfigMapStorageWriter

func NewConfigMapStorageWriter(client *kubernetes.Clientset, namespace string, name string, filename string) *ConfigMapStorageWriter

func (*ConfigMapStorageWriter) Close

func (w *ConfigMapStorageWriter) Close() error

type URLOpener

type URLOpener struct {
	Client *kubernetes.Clientset
}

func (*URLOpener) OpenBucketURL

func (o *URLOpener) OpenBucketURL(ctx context.Context, u *url.URL) (*blob.Bucket, error)

Jump to

Keyboard shortcuts

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