Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrFlowTerminated = errors.New("flow terminated")
)
Functions ¶
This section is empty.
Types ¶
type EtcdFlow ¶
type EtcdFlow struct {
// contains filtered or unexported fields
}
func (*EtcdFlow) RegisterListHandler ¶
func (f *EtcdFlow) RegisterListHandler(path string, h FlowEventHandler)
func (*EtcdFlow) RegisterWatchHandler ¶
func (f *EtcdFlow) RegisterWatchHandler(path string, h FlowEventHandler)
type Flow ¶
type Flow interface { RegisterWatchHandler(path string, handler FlowEventHandler) RegisterListHandler(path string, handler FlowEventHandler) Run(ctx context.Context) }
func NewEtcdFlow ¶
func NewEtcdFlow(cli *clientv3.Client, opts ...FlowOption) Flow
type FlowEvent ¶
type FlowEvent struct { Type FlowEventType Kv *FlowKeyValue PrevKv *FlowKeyValue }
type FlowEventHandler ¶
type FlowEventType ¶
type FlowEventType string
const ( FlowEventCreated FlowEventType = "CREATED" FlowEventUpdated FlowEventType = "UPDATED" FlowEventDeleted FlowEventType = "DELETED" )
type FlowKeyValue ¶
type FlowOption ¶
type FlowOption func(config *flowConfig)
func WithPageSize ¶
func WithPageSize(size int) FlowOption
func WithWatchBufferSize ¶
func WithWatchBufferSize(size int) FlowOption
Click to show internal directories.
Click to hide internal directories.