data_types

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WorkerTypeToCategory

func WorkerTypeToCategory(wt WorkerType) pubsub.WorkerCategory

WorkerTypeToCategory maps WorkerType to WorkerCategory

func WorkerTypeToDataSource added in v0.8.0

func WorkerTypeToDataSource(wt WorkerType) string

WorkerTypeToDataSource maps WorkerType to WorkerCategory

Types

type WorkRequest

type WorkRequest struct {
	WorkType  WorkerType `json:"workType,omitempty"`
	RequestId string     `json:"requestId,omitempty"`
	Data      []byte     `json:"data,omitempty"`
}

type WorkResponse

type WorkResponse struct {
	WorkRequest  *WorkRequest `json:"workRequest,omitempty"`
	Data         interface{}  `json:"data,omitempty"`
	Error        string       `json:"error,omitempty"`
	WorkerPeerId string       `json:"workerPeerId,omitempty"`
	RecordCount  int          `json:"recordCount,omitempty"`
}

type Worker

type Worker struct {
	IsLocal  bool
	IPAddr   string
	AddrInfo *peer.AddrInfo
	NodeData pubsub.NodeData
	Node     *masa.OracleNode
}

func NewWorker added in v0.7.0

func NewWorker(isLocal bool, nd *pubsub.NodeData) *Worker

type WorkerType

type WorkerType string
const (
	Discord                 WorkerType = "discord"
	DiscordProfile          WorkerType = "discord-profile"
	DiscordChannelMessages  WorkerType = "discord-channel-messages"
	DiscordSentiment        WorkerType = "discord-sentiment"
	TelegramSentiment       WorkerType = "telegram-sentiment"
	TelegramChannelMessages WorkerType = "telegram-channel-messages"
	DiscordGuildChannels    WorkerType = "discord-guild-channels"
	DiscordUserGuilds       WorkerType = "discord-user-guilds"
	LLMChat                 WorkerType = "llm-chat"
	Twitter                 WorkerType = "twitter"
	TwitterFollowers        WorkerType = "twitter-followers"
	TwitterProfile          WorkerType = "twitter-profile"
	TwitterSentiment        WorkerType = "twitter-sentiment"
	TwitterTrends           WorkerType = "twitter-trends"
	Web                     WorkerType = "web"
	WebSentiment            WorkerType = "web-sentiment"
	Test                    WorkerType = "test"

	DataSourceTwitter  = "twitter"
	DataSourceDiscord  = "discord"
	DataSourceWeb      = "web"
	DataSourceTelegram = "telegram"
)

Jump to

Keyboard shortcuts

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