Documentation
¶
Index ¶
Constants ¶
const ( Auth = "auth" Patrick = "patrick" Monkey = "monkey" TNS = "tns" Hoarder = "hoarder" Substrate = "substrate" Seer = "seer" Gateway = "gateway" Accounts = "accounts" )
Variables ¶
var ( Services = []string{Auth, Patrick, Monkey, TNS, Hoarder, Substrate, Seer, Gateway} Clients = []string{Auth, Patrick, Monkey, TNS, Hoarder, Substrate, Seer} HTTPServices = []string{Patrick, Substrate, Seer, Auth, Gateway} P2PStreamServices = []string{Seer, Auth, Patrick, TNS, Monkey, Hoarder, Substrate} )
var DefaultBranches = []string{"main", "master"}
TODO remove this and iterate, default branch should be gathered from a given repository
var ServicesRequiringRaft = []string{ Patrick, }
ServicesRequiringRaft are shapes that need config.SetRaftCluster before the service starts.
Functions ¶
func RegisterService ¶ added in v1.2.0
func RegisterService(name string, caps ServiceCapabilities)
RegisterService makes name a known service so shapes can reference it and the node/Dream can provision its resources. It is the extension point for build-tag-gated services (e.g. ee) that register themselves from an init(). It is idempotent: a name already known is left untouched, so registration is safe to reach through more than one import path.
func RequiresRaftCluster ¶ added in v1.2.0
RequiresRaftCluster reports whether services includes a shape listed in ServicesRequiringRaft.
func ValidateServices ¶
func ValidateServices(services []string, ops ...ValidateOption) error
Types ¶
type PathVariable ¶
type PathVariable string
const ( ProjectPathVariable PathVariable = "projects" ApplicationPathVariable PathVariable = "applications" ProjectIndexVariable PathVariable = "project" LinksPathVariable PathVariable = "links" BranchPathVariable PathVariable = "branches" CommitPathVariable PathVariable = "commit" CurrentCommitPathVariable PathVariable = "current" )
func (PathVariable) String ¶
func (pv PathVariable) String() string
type ServiceCapabilities ¶ added in v1.2.0
ServiceCapabilities declares which shared resources a registered service takes part in, so the node and Dream provision the right things for it:
- HTTP: added to HTTPServices, so the shared HTTP server is created for shapes that include this service (see cli/node/start.go) and cfg.Http() is non-nil.
- P2PStream: added to P2PStreamServices (p2p command/stream handlers).
- Client: added to Clients (a typed p2p client other nodes can dial).
type TnsPath ¶
type TnsPath struct {
// contains filtered or unexported fields
}
func NewTnsPath ¶
func (*TnsPath) Versioning ¶
func (_path *TnsPath) Versioning() *VersioningPath
type ValidateOption ¶
func ValidateHttp ¶
func ValidateHttp() ValidateOption
func ValidateP2P ¶
func ValidateP2P() ValidateOption
type VersioningPath ¶
type VersioningPath struct {
*TnsPath
}
func (*VersioningPath) Commit ¶
func (b *VersioningPath) Commit(commit string) *TnsPath
func (*VersioningPath) Links ¶
func (b *VersioningPath) Links() *TnsPath