template

package
v0.0.0-...-3ed0888 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package template implements the OCI CAS Template Protocol v1. https://github.com/xiekeyang/oci-discovery/blob/0be7eae246ae9a975a76ca209c045043f0793572/cas-template.md

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, baseURI *url.URL, config interface{}) (engine casengine.ReadCloser, err error)

New creates a new CAS-engine instance.

Types

type Engine

type Engine struct {

	// Client allows callers to configure the HTTP client.  Get will use
	// http.DefaultClient if Client is not set.  You can set this
	// property with:
	//
	//   engine, err := New(ctx, nil, config)
	//   // handle err and possibly engine.Close(ctx)
	//   engine.(*Engine).Client = yourCustomClient
	Client *http.Client
	// contains filtered or unexported fields
}

Engine implements the OCI CAS Template Protocol v1.

func (*Engine) Close

func (engine *Engine) Close(ctx context.Context) (err error)

Close releases resources held by the engine.

func (*Engine) Get

func (engine *Engine) Get(ctx context.Context, digest digest.Digest) (reader io.ReadCloser, err error)

Get returns a reader for retrieving a blob from the store.

func (*Engine) URI

func (engine *Engine) URI(digest digest.Digest) (uri *url.URL, err error)

URI returns the expanded, resolved URI for digest.

Jump to

Keyboard shortcuts

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