add options for components

This commit is contained in:
ginuerzh
2023-10-26 22:20:46 +08:00
parent 6431cd8bb9
commit 9e767d6745
6 changed files with 37 additions and 11 deletions

View File

@ -4,8 +4,11 @@ import (
"context"
)
type RecordOptions struct{}
type RecordOption func(opts *RecordOptions)
type Recorder interface {
Record(ctx context.Context, b []byte) error
Record(ctx context.Context, b []byte, opts ...RecordOption) error
}
type RecorderObject struct {