| "veyron.io/veyron/veyron2/ipc" |
| "veyron.io/veyron/veyron2/uniqueid" |
| "veyron.io/veyron/veyron2/verror2" |
| "veyron.io/veyron/veyron2/vtrace" |
| type vtraceServer struct { |
| func (v *vtraceServer) Trace(ctx ipc.ServerContext, id uniqueid.ID) (vtrace.TraceRecord, error) { |
| tr := v.store.TraceRecord(id) |
| return vtrace.TraceRecord{}, verror2.Make(verror2.NoExist, ctx, "No trace with id %x", id) |
| // TODO(toddw): Change ipc.ServerCall into a struct stub context. |
| func (v *vtraceServer) AllTraces(call ipc.ServerCall) error { |
| // TODO(mattr): Consider changing the store to allow us to iterate through traces |
| traces := v.store.TraceRecords() |
| if err := call.Send(traces[i]); err != nil { |
| func NewVtraceService(store vtrace.Store) interface{} { |
| return &vtraceServer{store} |