core/recorder/recorder.go
2023-09-18 21:12:08 +08:00

28 lines
546 B
Go

package recorder
import (
"context"
)
type Recorder interface {
Record(ctx context.Context, b []byte) error
}
type RecorderObject struct {
Recorder Recorder
Record string
Options *Options
}
type Options struct {
Direction bool
TimestampFormat string
Hexdump bool
}
const (
RecorderServiceClientAddress = "recorder.service.client.address"
RecorderServiceRouterDialAddress = "recorder.service.router.dial.address"
RecorderServiceRouterDialAddressError = "recorder.service.router.dial.address.error"
)