channel

package
v3.9.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

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

Close flushes the stream and closes it.

func (*MarkdownStreamController) Flush

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())

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL