-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for optional package lists for feeds
This allows feeds to be configured with options (starting with packages) which acts as a list of packages to poll with the intention of avoiding lossy firehose feeds. This is currently implemented for pypi.
- Loading branch information
Showing
21 changed files
with
531 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
package config | ||
|
||
import "github.com/ossf/package-feeds/feeds" | ||
|
||
type ScheduledFeedConfig struct { | ||
PubConfig PublisherConfig `yaml:"publisher"` | ||
EnabledFeeds []string `yaml:"enabled_feeds"` | ||
HTTPPort int `yaml:"http_port,omitempty"` | ||
PollRate string `yaml:"poll_rate"` | ||
Timer bool `yaml:"timer"` | ||
PubConfig PublisherConfig `yaml:"publisher"` | ||
Feeds []FeedConfig `yaml:"feeds"` | ||
HTTPPort int `yaml:"http_port,omitempty"` | ||
PollRate string `yaml:"poll_rate"` | ||
Timer bool `yaml:"timer"` | ||
} | ||
|
||
type PublisherConfig struct { | ||
Type string `mapstructure:"type"` | ||
Config interface{} `mapstructure:"config"` | ||
} | ||
|
||
type FeedConfig struct { | ||
Type string `mapstructure:"type"` | ||
Options feeds.FeedOptions `mapstructure:"options"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Crates Feed | ||
|
||
This feed allows polling of package updates from the crates package repository. | ||
|
||
## Configuration options | ||
|
||
The `packages` field is not supported by the crates feed. | ||
|
||
|
||
``` | ||
feeds: | ||
- type: crates | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.