Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Corpus ¶
type Corpus struct { // issue tracker data: Projects map[string]*Project TrackerUsers map[string]*IssueTrackerUser Milestones map[string]*Milestone Releases map[string]*Release Issues map[string]*Issue // source data: GitRepos map[string]*GitRepo // contains filtered or unexported fields }
func (*Corpus) Check ¶
Check verifies the internal structure of the Corpus data structures. It is intended for tests and debugging.
func (*Corpus) Initialize ¶
func (c *Corpus) Initialize(ctx context.Context, src MutationSource) error
Initialize populates the corpus using the data from the MutationSource. It returns once it's up-to-date. To incrementally update it later, use the Update method.
func (*Corpus) RLock ¶
func (c *Corpus) RLock()
RLock grabs the corpus's read lock. Grabbing the read lock prevents any concurrent writes from mutating the corpus. This is only necessary if the application is querying the corpus and calling its Update method concurrently.
func (*Corpus) Update ¶
Update incrementally updates the corpus from its current state to the latest state from the MutationSource passed earlier to Initialize. It does not return until there's either a new change or the context expires.
Update must not be called concurrently with any other Update calls. If reading the corpus concurrently while the corpus is updating, you must hold the read lock using Corpus.RLock.
type DiskMutationLogger ¶
type DiskMutationLogger struct {
// contains filtered or unexported fields
}
DiskMutationLogger logs mutations to disk.
func NewDiskMutationLogger ¶
func NewDiskMutationLogger(directory string) *DiskMutationLogger
NewDiskMutationLogger creates a new DiskMutationLogger, which will create mutations in the given directory.
func (*DiskMutationLogger) ForeachFile ¶
func (*DiskMutationLogger) GetMutations ¶
func (d *DiskMutationLogger) GetMutations(ctx context.Context) <-chan MutationStreamEvent
type GitCommit ¶
type GitCommit struct { Sha1 string Raw string DiffTree map[string]*GitDiffTreeFile // contains filtered or unexported fields }
type GitDiffTreeFile ¶
type GitDiffTreeFile struct {
// contains filtered or unexported fields
}
type Issue ¶
type Issue struct { ID string IssueKey string Created time.Time Updated time.Time Title string Body string Owner *IssueTrackerUser Assignees map[string]*IssueTrackerUser Milestones map[string]*Milestone Status string Closed bool ClosedAt time.Time ClosedBy *IssueTrackerUser Labels map[string]struct{} Commits map[string]*GitCommit URL string // contains filtered or unexported fields }
func (*Issue) GenMutationDiff ¶
func (a *Issue) GenMutationDiff(b *Issue) *devdashpb.IssueMutation
type IssueTrackerUser ¶
func (*IssueTrackerUser) GenMutationDiff ¶
func (a *IssueTrackerUser) GenMutationDiff(b *IssueTrackerUser) *devdashpb.TrackerUser
type Milestone ¶
type Milestone struct { ID string Name string Description string Closed bool Issues map[string]*Issue // contains filtered or unexported fields }
func (*Milestone) GenMutationDiff ¶
func (a *Milestone) GenMutationDiff(b *Milestone) *devdashpb.TrackerMilestone
type MutationLogger ¶
A MutationLogger logs mutations.
type MutationSource ¶
type MutationSource interface { // GetMutations returns a channel of mutations or related events. // The channel will never be closed. // All sends on the returned channel should select // on the provided context. GetMutations(context.Context) <-chan MutationStreamEvent }
A MutationSource yields a log of mutations that will catch a corpus back up to the present.
type MutationStreamEvent ¶
type MutationStreamEvent struct { Mutation *devdashpb.Mutation // Err is a fatal error reading the log. No other events will // follow an Err. Err error // End, if true, means that all mutations have been sent and // the next event might take some time to arrive (it might not // have occurred yet). The End event is not a terminal state // like Err. There may be multiple Ends. End bool }
MutationStreamEvent represents one of three possible events while reading mutations from disk. An event is either a mutation, an error, or reaching the current end of the log. Only one of the fields will be non-zero.
type Project ¶
type Project struct { ID string Name string Description string Issues map[string]*Issue Milestones map[string]*Milestone // contains filtered or unexported fields }
func (*Project) GenMutationDiff ¶
func (a *Project) GenMutationDiff(b *Project) *devdashpb.ProjectMutation
type Release ¶
type Release struct { ID string Name string Description string FreezeDate time.Time ReleaseDate time.Time Closed bool Milestones map[string]*Milestone // contains filtered or unexported fields }
func (*Release) GenMutationDiff ¶
func (a *Release) GenMutationDiff(b *Release) *devdashpb.ReleaseMutation
func (*Release) IsReleased ¶
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
Package devdashdata loads the project's corpus into memory to allow easy analysis without worrying about APIs and their pagination, quotas, and other nuisances and limitations.
|
Package devdashdata loads the project's corpus into memory to allow easy analysis without worrying about APIs and their pagination, quotas, and other nuisances and limitations. |
Package reclog contains readers and writers for a record wrapper format used by maintner.
|
Package reclog contains readers and writers for a record wrapper format used by maintner. |