cas

package
v0.0.0-...-a0a3655 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2019 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Package cas contains implementation of cipd.Storage service RPC service.

There are two instances of the implementation available:

  • The internal one, that doesn't do any ACL checks and that can be used internally by the CIPD backend. Get it with Internal().
  • The publicly exposed one. It wraps the internal one, adding ACLs. Get it with Public().

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Public

func Public(internal api.StorageServer) api.StorageServer

Public returns publicly exposed implementation of cipd.Storage service that wraps the given internal implementation with ACLs.

Types

type StorageServer

type StorageServer interface {
	api.StorageServer

	// GetReader returns an io.ReaderAt implementation to read contents of an
	// object in the storage.
	//
	// Returns grpc errors. In particular NotFound is returned if there's no such
	// object in the storage.
	GetReader(c context.Context, ref *api.ObjectRef) (gs.Reader, error)
}

StorageServer extends StorageServer RPC interface with some methods used internally by other CIPD server modules.

func Internal

func Internal(d *tq.Dispatcher) StorageServer

Internal returns non-ACLed implementation of StorageService.

It can be used internally by the backend. Assumes ACL checks are already done.

Registers some task queue tasks in the given dispatcher.

Directories

Path Synopsis
Package tasks contains task queue tasks definitions.
Package tasks contains task queue tasks definitions.

Jump to

Keyboard shortcuts

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