agent

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a client for Slack agent.

func NewClient

func NewClient(serverURL string) (*Client, error)

NewClient creates Client.

func (*Client) PostResult

func (c *Client) PostResult(ctx context.Context, channel, result string, extend bool, namespaceName, podName string, info *runner.JobInfo) error

PostResult sends a result of CI job to server.

func (*Client) UpdateServerURL added in v0.4.2

func (c *Client) UpdateServerURL(serverURL string) error

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server receives requests from clients and communicates with Slack.

func NewServer

func NewServer(logger logr.Logger, listenAddr string, defaultChannel string, appToken, botToken string, devMode bool, verbose bool) (*Server, error)

NewServer creates slack agent server.

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

Run starts the slack agent server.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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