vtrace

package
Version: v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2021 License: BSD-3-Clause Imports: 8 Imported by: 6

Documentation

Overview

Package vtrace defines an interface to access v.io/v23/vtrace traces, to help analyze and debug distributed systems.

Index

Constants

This section is empty.

Variables

View Source
var StoreDesc rpc.InterfaceDesc = descStore

StoreDesc describes the Store interface.

Functions

This section is empty.

Types

type StoreAllTracesClientCall

type StoreAllTracesClientCall interface {
	StoreAllTracesClientStream
	// Finish blocks until the server is done, and returns the positional return
	// values for call.
	//
	// Finish returns immediately if the call has been canceled; depending on the
	// timing the output could either be an error signaling cancelation, or the
	// valid positional return values from the server.
	//
	// Calling Finish is mandatory for releasing stream resources, unless the call
	// has been canceled or any of the other methods return an error.  Finish should
	// be called at most once.
	Finish() error
}

StoreAllTracesClientCall represents the call returned from Store.AllTraces.

type StoreAllTracesClientStream

type StoreAllTracesClientStream interface {
	// RecvStream returns the receiver side of the Store.AllTraces client stream.
	RecvStream() interface {
		// Advance stages an item so that it may be retrieved via Value.  Returns
		// true iff there is an item to retrieve.  Advance must be called before
		// Value is called.  May block if an item is not available.
		Advance() bool
		// Value returns the item that was staged by Advance.  May panic if Advance
		// returned false or was not called.  Never blocks.
		Value() vtrace.TraceRecord
		// Err returns any error encountered by Advance.  Never blocks.
		Err() error
	}
}

StoreAllTracesClientStream is the client stream for Store.AllTraces.

type StoreAllTracesServerCall

type StoreAllTracesServerCall interface {
	rpc.ServerCall
	StoreAllTracesServerStream
}

StoreAllTracesServerCall represents the context passed to Store.AllTraces.

type StoreAllTracesServerCallStub

type StoreAllTracesServerCallStub struct {
	rpc.StreamServerCall
}

StoreAllTracesServerCallStub is a wrapper that converts rpc.StreamServerCall into a typesafe stub that implements StoreAllTracesServerCall.

func (*StoreAllTracesServerCallStub) Init

Init initializes StoreAllTracesServerCallStub from rpc.StreamServerCall.

func (*StoreAllTracesServerCallStub) SendStream

func (s *StoreAllTracesServerCallStub) SendStream() interface {
	Send(item vtrace.TraceRecord) error
}

SendStream returns the send side of the Store.AllTraces server stream.

type StoreAllTracesServerStream

type StoreAllTracesServerStream interface {
	// SendStream returns the send side of the Store.AllTraces server stream.
	SendStream() interface {
		// Send places the item onto the output stream.  Returns errors encountered
		// while sending.  Blocks if there is no buffer space; will unblock when
		// buffer space is available.
		Send(item vtrace.TraceRecord) error
	}
}

StoreAllTracesServerStream is the server stream for Store.AllTraces.

type StoreClientMethods

type StoreClientMethods interface {
	// Trace returns the trace that matches the given Id.
	// Will return a NoExists error if no matching trace was found.
	Trace(_ *context.T, id uniqueid.Id, _ ...rpc.CallOpt) (vtrace.TraceRecord, error)
	// AllTraces returns TraceRecords for all traces the server currently
	// knows about.
	AllTraces(*context.T, ...rpc.CallOpt) (StoreAllTracesClientCall, error)
}

StoreClientMethods is the client interface containing Store methods.

type StoreClientStub

type StoreClientStub interface {
	StoreClientMethods
}

StoreClientStub embeds StoreClientMethods and is a placeholder for additional management operations.

func StoreClient

func StoreClient(name string) StoreClientStub

StoreClient returns a client stub for Store.

type StoreServerMethods

type StoreServerMethods interface {
	// Trace returns the trace that matches the given Id.
	// Will return a NoExists error if no matching trace was found.
	Trace(_ *context.T, _ rpc.ServerCall, id uniqueid.Id) (vtrace.TraceRecord, error)
	// AllTraces returns TraceRecords for all traces the server currently
	// knows about.
	AllTraces(*context.T, StoreAllTracesServerCall) error
}

StoreServerMethods is the interface a server writer implements for Store.

type StoreServerStub

type StoreServerStub interface {
	StoreServerStubMethods
	// DescribeInterfaces the Store interfaces.
	Describe__() []rpc.InterfaceDesc
}

StoreServerStub adds universal methods to StoreServerStubMethods.

func StoreServer

func StoreServer(impl StoreServerMethods) StoreServerStub

StoreServer returns a server stub for Store. It converts an implementation of StoreServerMethods into an object that may be used by rpc.Server.

type StoreServerStubMethods

type StoreServerStubMethods interface {
	// Trace returns the trace that matches the given Id.
	// Will return a NoExists error if no matching trace was found.
	Trace(_ *context.T, _ rpc.ServerCall, id uniqueid.Id) (vtrace.TraceRecord, error)
	// AllTraces returns TraceRecords for all traces the server currently
	// knows about.
	AllTraces(*context.T, *StoreAllTracesServerCallStub) error
}

StoreServerStubMethods is the server interface containing Store methods, as expected by rpc.Server. The only difference between this interface and StoreServerMethods is the streaming methods.

Source Files

Jump to

Keyboard shortcuts

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