Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultManager ¶
func NewDefaultManager(stackID StackID) *defaultManager
NewDefaultManager constructs new stack.
Types ¶
type LiteralStringToken ¶
type LiteralStringToken string
LiteralStringToken represents a literal string value.
func (LiteralStringToken) Dependencies ¶
func (t LiteralStringToken) Dependencies() []Resource
type Manager ¶
type Manager interface { // stackID returns a unique ID for stack. StackID() StackID // Add a resource into stack. AddResource(res Resource) error // Add a dependency relationship between resources. AddDependency(dependee Resource, depender Resource) error // ListResources list all resources for specific type. // pResourceSlice must be a pointer to a slice of resources, which will be filled. ListResources(pResourceSlice interface{}) error // TopologicalTraversal visits resources in stack in topological order. TopologicalTraversal(visitor ResourceVisitor) error }
Manager presents a resource graph, where resources can depend on each other.
type Resource ¶
type Resource interface { // resource's stack. Stack() Manager // resource's Type. Type() string // resource's ID within stack. ID() string }
Resource represents a deployment unit.
type ResourceFieldStringToken ¶
type ResourceFieldStringToken struct {
// contains filtered or unexported fields
}
func NewResourceFieldStringToken ¶
func NewResourceFieldStringToken(res Resource, fieldPath string, resolverFunc func(ctx context.Context, res Resource, fieldPath string) (string, error)) *ResourceFieldStringToken
NewResourceFieldStringToken constructs new ResourceFieldStringToken.
func (*ResourceFieldStringToken) Dependencies ¶
func (t *ResourceFieldStringToken) Dependencies() []Resource
func (*ResourceFieldStringToken) MarshalJSON ¶
func (t *ResourceFieldStringToken) MarshalJSON() ([]byte, error)
type ResourceMeta ¶
type ResourceMeta struct {
// contains filtered or unexported fields
}
Metadata for all resources.
func NewResourceMeta ¶
func NewResourceMeta(stack Manager, resType string, id string) ResourceMeta
NewResourceMeta constructs new resource metadata.
func (*ResourceMeta) ID ¶
func (m *ResourceMeta) ID() string
func (*ResourceMeta) Stack ¶
func (m *ResourceMeta) Stack() Manager
func (*ResourceMeta) Type ¶
func (m *ResourceMeta) Type() string
type ResourceVisitor ¶
ResourceVisitor represents a functor that can operate on a resource.
type StackID ¶
type StackID types.NamespacedName
type StringToken ¶
StringToken represent a string value that can be resolved at resolution time.
Click to show internal directories.
Click to hide internal directories.