services

package
v0.0.0-...-20386cd Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const ANALYSER_SVC = "analyser_svc"
View Source
const BLOCKLIST_SVC = "blocklist_svc"
View Source
const SHADOW_DRIVE_SVC = "shadow_drive_svc"
View Source
const SOLANA_SVC = "solana_svc"
View Source
const TWITTER_SVC = "twitter_svc"

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalyserService

type AnalyserService struct {
	Service

	InboundChan chan *market_sentiment.MarketInput
	// contains filtered or unexported fields
}

func (*AnalyserService) Analyse

func (svc *AnalyserService) Analyse(in *market_sentiment.MarketInput) (*market_sentiment.MarketInput, error)

TODO Input

func (AnalyserService) Id

func (svc AnalyserService) Id() string

func (*AnalyserService) Notify

func (svc *AnalyserService) Notify(in *market_sentiment.MarketInput) error

func (*AnalyserService) ParseCorrelations

func (svc *AnalyserService) ParseCorrelations(in *market_sentiment.MarketInput) []string

func (*AnalyserService) RegisterTokenListener

func (svc *AnalyserService) RegisterTokenListener(token string, callback SentimentCallback) error

func (*AnalyserService) RegisterUserListener

func (svc *AnalyserService) RegisterUserListener(user string, callback SentimentCallback) error

func (*AnalyserService) Start

func (svc *AnalyserService) Start() error

func (*AnalyserService) SummarizeMinute

func (svc *AnalyserService) SummarizeMinute(minStart int)

func (*AnalyserService) Worker

func (svc *AnalyserService) Worker()

type BlockListService

type BlockListService struct {
	Service
}

func (BlockListService) Id

func (svc BlockListService) Id() string

type FileRequest

type FileRequest struct {
	StorageAccount string `json:"storageAccount"`
}

type FileResponse

type FileResponse struct {
	Keys []string `json:"keys"`
}

type ListenerFunc

type ListenerFunc func(instruction *shadow_drive_user_staking.Instruction)

type SentimentCallback

type SentimentCallback func(in *market_sentiment.MarketInput) error

type Service

type Service interface {
	Id() string
	Configure(map[string]Service) error
	Start() error
	Stop()
}

type ShadowDriveService

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

func (*ShadowDriveService) CheckFile

func (svc *ShadowDriveService) CheckFile(driveID solana.PublicKey) bool

func (*ShadowDriveService) Configure

func (svc *ShadowDriveService) Configure(svcs map[string]Service) error

func (*ShadowDriveService) Files

func (svc *ShadowDriveService) Files(driveID solana.PublicKey) ([]string, error)

func (ShadowDriveService) Id

func (*ShadowDriveService) Start

func (svc *ShadowDriveService) Start() error

func (*ShadowDriveService) Stop

func (svc *ShadowDriveService) Stop()

type SignatureLookup

type SignatureLookup struct {
	Signature solana.Signature
	BlokTime  time.Time
	Attempts  int
}

type SolanaService

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

func (*SolanaService) Configure

func (svc *SolanaService) Configure(svcs map[string]Service) error

func (SolanaService) Id

func (SolanaService) Id() string

func (*SolanaService) PollWs

func (svc *SolanaService) PollWs(onLogs func(signature *SignatureLookup, logs []string)) error

PollWs using websocket listener func (svc *SolanaService) PollWs(onInstruction func(acc rpc.KeyedAccount)) error {

func (*SolanaService) Start

func (svc *SolanaService) Start() error

func (*SolanaService) Stop

func (svc *SolanaService) Stop()

type TwitterService

type TwitterService struct {
	Service
	// contains filtered or unexported fields
}

func (*TwitterService) EnableMediaProcessing

func (svc *TwitterService) EnableMediaProcessing(users ...string)

Enables OCR procssing for meida items a given user posts when it comes through the stream

func (*TwitterService) Id

func (svc *TwitterService) Id() string

Service ID

func (*TwitterService) Shutdown

func (svc *TwitterService) Shutdown()

func (*TwitterService) Start

func (svc *TwitterService) Start() error

func (*TwitterService) UserStream

func (svc *TwitterService) UserStream(filters []string) error

func (*TwitterService) UserTweets

func (svc *TwitterService) UserTweets(username string) ([]twitter.Tweet, error)

Jump to

Keyboard shortcuts

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