example

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FireDoneTimeout is how long fireDone will wait for both sending and receiving.
	FireDoneTimeout = 3 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyValueYarpcServer

type KeyValueYarpcServer struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

KeyValueYarpcServer implements examplepb.KeyValueYarpcServer.

func NewKeyValueYarpcServer

func NewKeyValueYarpcServer() *KeyValueYarpcServer

NewKeyValueYarpcServer returns a new KeyValueYarpcServer.

func (*KeyValueYarpcServer) GetValue

GetValue implements GetValue.

func (*KeyValueYarpcServer) SetValue

SetValue implements SetValue.

type SinkYarpcServer

type SinkYarpcServer struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

SinkYarpcServer implements examplepb.SinkYarpcServer.

func NewSinkYarpcServer

func NewSinkYarpcServer(withFireDone bool) *SinkYarpcServer

NewSinkYarpcServer returns a new SinkYarpcServer.

func (*SinkYarpcServer) Fire

func (s *SinkYarpcServer) Fire(ctx context.Context, request *examplepb.FireRequest) error

Fire implements Fire.

func (*SinkYarpcServer) Values

func (s *SinkYarpcServer) Values() []string

Values returns a copy of the values that have been fired.

func (*SinkYarpcServer) WaitFireDone

func (s *SinkYarpcServer) WaitFireDone() error

WaitFireDone blocks until a fire is done, if withFireDone is set.

If will timeout after FireDoneTimeout and return error.

Jump to

Keyboard shortcuts

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