slack

package
v0.0.2-0...-6da4d8c Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2025 License: Apache-2.0 Imports: 16 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(accessToken secret.String, options ...Option) hatchery.Source

Types

type Option

type Option func(*config)

func WithDuration

func WithDuration(duration time.Duration) Option

WithDuration sets the duration to read logs. Default is 10 minutes.

func WithHTTPClient

func WithHTTPClient(httpClient interfaces.HTTPClient) Option

WithHTTPClient sets a HTTP client to send requests to Slack API.

func WithLimit

func WithLimit(limit int) Option

WithLimit sets the number of logs to read in a single request. If it's set to 0 or negative value, "limit" parameter is not included in the request. Default is 1000.

func WithMaxPages

func WithMaxPages(MaxPages int) Option

WithMaxPages sets the maximum number of pages to read. Default is 0, which means it reads logs until there are no more logs.

Jump to

Keyboard shortcuts

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