Documentation
¶
Index ¶
- func NewChannel(client *lark.Client, wsClient *larkws.Client, opts ...types.ChannelOption) types.Channel
- type CardStreamController
- type MarkdownStreamController
- func (m *MarkdownStreamController) Append(ctx context.Context, text string) error
- func (m *MarkdownStreamController) Close(ctx context.Context) error
- func (m *MarkdownStreamController) Flush(ctx context.Context) error
- func (m *MarkdownStreamController) UpdateCard(ctx context.Context, card string) error
- type UpdateQueue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewChannel ¶
func NewChannel(client *lark.Client, wsClient *larkws.Client, opts ...types.ChannelOption) types.Channel
NewChannel creates a new Channel instance with the provided Lark API client and WebSocket client.
Types ¶
type CardStreamController ¶
type CardStreamController struct {
// contains filtered or unexported fields
}
func NewCardStreamController ¶
func NewCardStreamController(client *lark.Client, config types.ChannelConfig, messageID string) *CardStreamController
func (*CardStreamController) Append ¶
func (c *CardStreamController) Append(ctx context.Context, text string) error
func (*CardStreamController) Close ¶
func (c *CardStreamController) Close(ctx context.Context) error
func (*CardStreamController) Flush ¶
func (c *CardStreamController) Flush(ctx context.Context) error
func (*CardStreamController) UpdateCard ¶
func (c *CardStreamController) UpdateCard(ctx context.Context, card string) error
type MarkdownStreamController ¶
type MarkdownStreamController struct {
// contains filtered or unexported fields
}
MarkdownStreamController is a StreamController for markdown text.
func NewMarkdownStreamController ¶
func NewMarkdownStreamController(client *lark.Client, config types.ChannelConfig, messageID, initialContent, title string) *MarkdownStreamController
NewMarkdownStreamController creates a new StreamController for updating markdown messages.
func (*MarkdownStreamController) Append ¶
func (m *MarkdownStreamController) Append(ctx context.Context, text string) error
Append appends text to the markdown stream and triggers a throttled update.
func (*MarkdownStreamController) Close ¶
func (m *MarkdownStreamController) Close(ctx context.Context) error
Close flushes the stream and closes it.
func (*MarkdownStreamController) Flush ¶
func (m *MarkdownStreamController) Flush(ctx context.Context) error
Flush forces an immediate update of the message.
func (*MarkdownStreamController) UpdateCard ¶
func (m *MarkdownStreamController) UpdateCard(ctx context.Context, card string) error
UpdateCard is not supported for MarkdownStreamController.
type UpdateQueue ¶
type UpdateQueue struct {
// contains filtered or unexported fields
}
func NewUpdateQueue ¶
func NewUpdateQueue(ctx context.Context) *UpdateQueue
func (*UpdateQueue) Stop ¶
func (q *UpdateQueue) Stop()
func (*UpdateQueue) Submit ¶
func (q *UpdateQueue) Submit(f func())
Click to show internal directories.
Click to hide internal directories.