Documentation
¶
Index ¶
- type Core
- func (c *Core) DeleteOffset(ctx context.Context, m *Model) error
- func (c *Core) DeleteOffsetStatus(ctx context.Context, m *Status) error
- func (c *Core) Exists(ctx context.Context, m *Model) (bool, error)
- func (c *Core) GetOffset(ctx context.Context, m *Model) (*Model, error)
- func (c *Core) GetOffsetStatus(ctx context.Context, m *Status) (*Status, error)
- func (c *Core) OffsetStatusExists(ctx context.Context, m *Status) (bool, error)
- func (c *Core) RollBackOffset(ctx context.Context, m *Model) error
- func (c *Core) SetOffset(ctx context.Context, m *Model) error
- func (c *Core) SetOffsetStatus(ctx context.Context, m *Status) error
- type ICore
- type IRepo
- type Model
- type Repo
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Core ¶
type Core struct {
// contains filtered or unexported fields
}
Core implements all business logic for offset
func (*Core) DeleteOffset ¶
DeleteOffset deletes an offset
func (*Core) DeleteOffsetStatus ¶
DeleteOffsetStatus deletes an offset status
func (*Core) GetOffsetStatus ¶
GetOffsetStatus returns offset with the given key
func (*Core) OffsetStatusExists ¶
OffsetStatusExists to check if the offset status exists with fully qualified consul key
func (*Core) RollBackOffset ¶
RollBackOffset rolls back to the previous offset in-memory
type ICore ¶
type ICore interface { SetOffset(ctx context.Context, m *Model) error RollBackOffset(ctx context.Context, m *Model) error GetOffset(ctx context.Context, m *Model) (*Model, error) DeleteOffset(ctx context.Context, m *Model) error Exists(ctx context.Context, m *Model) (bool, error) SetOffsetStatus(ctx context.Context, m *Status) error OffsetStatusExists(ctx context.Context, m *Status) (bool, error) GetOffsetStatus(ctx context.Context, m *Status) (*Status, error) DeleteOffsetStatus(ctx context.Context, m *Status) error }
ICore is an interface over offset core
type Model ¶
type Model struct { common.BaseModel Topic string `json:"topic_id"` Subscription string `json:"subscription_id"` Partition int32 `json:"partition_id"` LatestOffset int32 `json:"latest_offset_value"` OrderingKey string `json:"ordering_key"` // contains filtered or unexported fields }
Model for an offset
Click to show internal directories.
Click to hide internal directories.