bttest

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2016 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package bttest contains test helpers for working with the bigtable package.

To use a Server, create it, and then connect to it with no security: (The project/instance values are ignored.)

srv, err := bttest.NewServer("127.0.0.1:0")
...
conn, err := grpc.Dial(srv.Addr, grpc.WithInsecure())
...
client, err := bigtable.NewClient(ctx, proj, instance,
	cloud.WithBaseGRPC(conn))
...

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Addr string
	// contains filtered or unexported fields
}

Server is an in-memory Cloud Bigtable fake. It is unauthenticated, and only a rough approximation.

func NewServer

func NewServer(laddr string) (*Server, error)

NewServer creates a new Server. The Server will be listening for gRPC connections, without TLS, on the provided address. The resolved address is named by the Addr field.

func (*Server) Close

func (s *Server) Close()

Close shuts down the server.

Jump to

Keyboard shortcuts

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