example

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestCheramiYARPC

func TestCheramiYARPC(t *testing.T)

TestCheramiYARPC will create a yarpc client (using cherami transport), and issue an one way rpc call to the server To run this example, the cherami server(https://github.com/uber/cherami-server) needs to be started locally first And the destination(/test/dest) and consumer group(/test/dest_cg) needs to be created using cherami-cli

Types

type ServerConfig

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

ServerConfig is the configuration needed to create a ExampleService

type Service

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

Service demos a service that implements an oneway procedure(defined in thrift/example.thrift)

func NewService

func NewService(config ServerConfig) *Service

NewService creates a example service

func (*Service) Award

func (s *Service) Award(ctx context.Context, Token *string) error

Award implements the oneway function defined in thrift

func (*Service) Start

func (s *Service) Start() error

Start starts the service

func (*Service) Stop

func (s *Service) Stop() error

Stop stops the service

Directories

Path Synopsis
thrift

Jump to

Keyboard shortcuts

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