customer

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a remote client that implements customer.Interface

func NewClient

func NewClient(tracer opentracing.Tracer, logger log.Factory, hostPort string) *Client

NewClient creates a new customer.Client

func (*Client) Get

func (c *Client) Get(ctx context.Context, customerID string) (*Customer, error)

Get implements customer.Interface#Get as an RPC

type Customer

type Customer struct {
	ID       string
	Name     string
	Location string
}

Customer contains data about a customer.

type Interface

type Interface interface {
	Get(ctx context.Context, customerID string) (*Customer, error)
}

Interface exposed by the Customer service.

type Server

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

Server implements Customer service

func NewServer

func NewServer(hostPort string, tracer opentracing.Tracer, metricsFactory metrics.Factory, logger log.Factory) *Server

NewServer creates a new customer.Server

func (*Server) Run

func (s *Server) Run() error

Run starts the Customer server

Jump to

Keyboard shortcuts

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