httpapi

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2025 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Overview

Package httpapi @Author Clover @Data 2024/7/20 下午9:37:00 @Desc http and http webhook

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandlerHeartBeat

func HandlerHeartBeat(bot *rikkabot.RikkaBot)

HandlerHeartBeat 心跳事件

func RunHttp

func RunHttp(rbot *rikkabot.RikkaBot)

RunHttp 启动 http、http上报器

Types

type HttpClient

type HttpClient struct {
	MaxRetries int
	InitDelay  time.Duration // 最初的重试间隔
	MaxDelay   time.Duration // 最大重试间隔
	// contains filtered or unexported fields
}

HttpClient 反向http

func (HttpClient) HandlerPostEvent

func (c HttpClient) HandlerPostEvent(event event.IEvent)

HandlerPostEvent 处理 post 事件

func (HttpClient) Run

func (c HttpClient) Run()

type HttpServer

type HttpServer struct {
	HttpAddr    string
	AccessToken string // 鉴权
	// contains filtered or unexported fields
}

HttpServer http 服务

func (HttpServer) Run

func (s HttpServer) Run()

Run HttpServer

Directories

Path Synopsis
Package handlers @Author Clover @Data 2024/7/21 下午10:45:00 @Desc 处理 http server相关
Package handlers @Author Clover @Data 2024/7/21 下午10:45:00 @Desc 处理 http server相关

Jump to

Keyboard shortcuts

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