Documentation ¶
Index ¶
- func RunScript(ctx context.Context, name string, args ...string) error
- type CredentialGetter
- type Executor
- type FSRepo
- type FTPFetcher
- type Fetcher
- type FetcherFactory
- type HTTPFetcher
- type Integrity
- type Logger
- type MQTTReceiver
- type MQTTReceiverOpt
- type Message
- type ReceiveError
- type Receiver
- type Repo
- type TopicsError
- type WISMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FTPFetcher ¶
type FTPFetcher struct{}
FTPFetcher is a Fetcher for downloading ftp:// URLs. There is no connection caching, so every fetch creates a new FTP connection.
func (*FTPFetcher) FetchContext ¶
type Fetcher ¶
type Fetcher interface { // Fetch the file at url to dest. They file will exist at dest unless err is non-nil. Fetch(url string, dst io.Writer) error // FetchContext is the same as Fetch but takes a context to potentially cancel the fetch. FetchContext(ctx context.Context, url string, dst io.Writer) error }
func FindFetcher ¶
FindFetcher returns a fetcher for the URL, if available, otherwise nil.
type FetcherFactory ¶
type HTTPFetcher ¶
type HTTPFetcher struct {
// contains filtered or unexported fields
}
func (*HTTPFetcher) FetchContext ¶
type MQTTReceiver ¶
type MQTTReceiver struct {
// contains filtered or unexported fields
}
func (*MQTTReceiver) Err ¶
func (r *MQTTReceiver) Err() error
func (*MQTTReceiver) Message ¶
func (r *MQTTReceiver) Message() *Message
func (*MQTTReceiver) Next ¶
func (r *MQTTReceiver) Next() bool
type MQTTReceiverOpt ¶
type MQTTReceiverOpt func(*MQTTReceiver)
func WithClientID ¶
func WithClientID(id string) MQTTReceiverOpt
func WithDebug ¶
func WithDebug(debug bool) MQTTReceiverOpt
func WithEnvCredentials ¶
func WithEnvCredentials(pfx string) MQTTReceiverOpt
func WithIgnoreTopicErrors ¶
func WithIgnoreTopicErrors(b bool) MQTTReceiverOpt
func WithQoS ¶
func WithQoS(qos byte, cleanStart bool) MQTTReceiverOpt
func WithTLSConfig ¶
func WithTLSConfig(cfg *tls.Config) MQTTReceiverOpt
type Message ¶
type Message struct { Topic string Received time.Time Source string Payload WISMessage }
WIS is the message as defined in https://github.com/wmo-im/GTStoWIS2/tree/main/message_format
type ReceiveError ¶
ReceiveError is any error that occurs receiving or decoding a message
func (*ReceiveError) Error ¶
func (e *ReceiveError) Error() string
type Receiver ¶
func NewMQTTReceiver ¶
type Repo ¶
type TopicsError ¶
type TopicsError struct {
Failed []string
}
func (*TopicsError) Error ¶
func (e *TopicsError) Error() string
type WISMessage ¶
type WISMessage struct { PubTime *time.Time `json:"pubTime"` BaseURL string `json:"baseUrl"` RelPath string `json:"relPath"` Integrity Integrity `json:"integrity"` Size int64 `json:"size"` RetPath string `json:"retPath"` }
func (WISMessage) IsValid ¶
func (msg WISMessage) IsValid() error
func (WISMessage) URL ¶
func (msg WISMessage) URL() string
Click to show internal directories.
Click to hide internal directories.