Documentation ¶
Index ¶
- type App
- type CleanupFunc
- type Source
- func (s *Source) CloneFrom(source string, refn plumbing.ReferenceName) (string, *git.Repository, error)
- func (s *Source) Close() error
- func (s *Source) Complete() error
- func (s *Source) HasMultiVersionsSupport() bool
- func (s *Source) IsComplete() bool
- func (s *Source) Open(gr *git.Repository) error
- func (s *Source) ReverseConnectBroker(b *bus.Broker) chan bool
- func (s *Source) String() string
- func (s *Source) UpdateFromUpstream() error
- func (s *Source) Versions() (*vcs.Versions, error)
- type Sources
- func (ss *Sources) Add(name string, path string) (*Source, error)
- func (ss *Sources) AddLazy(name string, completeFn sourceCompleteFunc) (*Source, error)
- func (ss *Sources) All() []*Source
- func (ss *Sources) Close() error
- func (ss *Sources) ForEach(fn func(*Source) error) error
- func (ss *Sources) Get(name string) (bool, *Source, error)
- func (ss *Sources) Has(name string) bool
- func (ss *Sources) MustGet(name string) (s *Source, err error)
- func (ss *Sources) Names() []string
- func (ss *Sources) Open() error
- func (ss *Sources) Primary() (bool, *Source, error)
- func (ss *Sources) SelectPrimary(name string) error
- func (ss *Sources) WhitelistedNames() []string
- type Teardown
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { *Teardown // version is the application version. Version string LiveConfigDB config.DB Broker *bus.Broker Watcher *notify.Watcher Sources *Sources Frontend *frontend.Frontend // contains filtered or unexported fields }
func (*App) HasMultiVersionsSupport ¶
type CleanupFunc ¶
type CleanupFunc func() error
type Source ¶
type Source struct { *Teardown // Name identifies the source, usually this is the name of the // version the source belongs to. Name string // Path is the absolute path to the DDT, this might be a subpath // of Repo.Path, when the DDT is nested inside a repository. // Optional when a completeFn is provided. Path string // Broker is the Source-specific broker. Broker *bus.Broker // ConfigDB is the central configuration and managed from the outside. ConfigDB config.DB Tree *ddt.Tree Search *search.Search MetaDB meta.DB AuthorDB author.DB // Repo, optional. Repo *vcs.Repo // Watcher watches the Path for changes, optional. Watcher *notify.Watcher // contains filtered or unexported fields }
func NewLazySource ¶
func (*Source) CloneFrom ¶
func (s *Source) CloneFrom(source string, refn plumbing.ReferenceName) (string, *git.Repository, error)
CloneFrom copies the source repository by cloning it into a temporary directory.
func (*Source) HasMultiVersionsSupport ¶
func (*Source) IsComplete ¶
func (*Source) Open ¶
func (s *Source) Open(gr *git.Repository) error
Open continues the initialization of the struct. When an optinal existing git.Repository is provided it will be used instead of initialization a new one using path information of the struct.
func (*Source) ReverseConnectBroker ¶
ReverseConnectBroker connects the internal broker to the provided one, essentially pushing all internal messages of this source out to the external broker.
func (*Source) UpdateFromUpstream ¶
UpdateFromUpstream updates the source repo from the one it was cloned. For the live source, this might be a remote repository.
type Sources ¶
type Sources struct { *Teardown // contains filtered or unexported fields }
func (*Sources) SelectPrimary ¶
func (*Sources) WhitelistedNames ¶
type Teardown ¶
type Teardown struct { Scope string // contains filtered or unexported fields }
Teardown stacks functions for teardown.
func (*Teardown) AddAsyncFunc ¶
func (td *Teardown) AddAsyncFunc(fn CleanupFunc)
func (*Teardown) AddCancelFunc ¶
func (td *Teardown) AddCancelFunc(fn context.CancelFunc)
func (*Teardown) AddFunc ¶
func (td *Teardown) AddFunc(fn CleanupFunc)
Click to show internal directories.
Click to hide internal directories.