| svtrace "v.io/core/veyron2/services/mgmt/vtrace" |
| "v.io/core/veyron2/uniqueid" |
| "v.io/core/veyron2/verror" |
| "v.io/core/veyron2/vtrace" |
| type vtraceService struct{} |
| func (v *vtraceService) Trace(ctx ipc.ServerContext, id uniqueid.Id) (vtrace.TraceRecord, error) { |
| store := vtrace.GetStore(ctx.Context()) |
| tr := store.TraceRecord(id) |
| return vtrace.TraceRecord{}, verror.New(verror.ErrNoExist, ctx.Context(), "No trace with id %x", id) |
| func (v *vtraceService) AllTraces(ctx svtrace.StoreAllTracesContext) error { |
| // TODO(mattr): Consider changing the store to allow us to iterate through traces |
| store := vtrace.GetStore(ctx.Context()) |
| traces := store.TraceRecords() |
| if err := ctx.SendStream().Send(traces[i]); err != nil { |
| func NewVtraceService() interface{} { |
| return svtrace.StoreServer(&vtraceService{}) |