pulumix

package
v0.0.0-...-5cd5cfe Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 10 Imported by: 3

Documentation

Index

Constants

View Source
const (
	ResourceStatus_Creating = iota
	ResourceStatus_Updating
	ResourceStatus_Deleting
	ResourceStatus_Created
	ResourceStatus_Deleted
	ResourceStatus_Updated
	ResourceStatus_Failed_Create
	ResourceStatus_Failed_Delete
	ResourceStatus_Failed_Update
	ResourceStatus_Unchanged
	ResourceStatus_None
)

Variables

View Source
var MessageResourceStates = map[ResourceStatus]string{
	ResourceStatus_Creating:      "creating",
	ResourceStatus_Updating:      "updating",
	ResourceStatus_Deleting:      "deleting",
	ResourceStatus_Created:       "created",
	ResourceStatus_Deleted:       "deleted",
	ResourceStatus_Updated:       "updated",
	ResourceStatus_Failed_Create: "create failed",
	ResourceStatus_Failed_Delete: "delete failed",
	ResourceStatus_Failed_Update: "updated failed",
	ResourceStatus_Unchanged:     "unchanged",
	ResourceStatus_None:          "",
}
View Source
var SuccessResourceStates = map[string]ResourceStatus{
	"create": ResourceStatus_Created,
	"delete": ResourceStatus_Deleted,
	"same":   ResourceStatus_Unchanged,
	"update": ResourceStatus_Updated,
}

Functions

func IsNitricChildResource

func IsNitricChildResource(pulumiUrn string) bool

IsNitricResource - Checks if the Pulumi resource has a parent that is a Nitric Resource Type.

func IsNitricParentResource

func IsNitricParentResource(pulumiUrn string) bool

func NitricResourceIdFromPulumiUrn

func NitricResourceIdFromPulumiUrn(pulumiUrn string) *resourcespb.ResourceIdentifier

func ParentResourceFromResourceId

func ParentResourceFromResourceId(ctx *pulumi.Context, id *resourcespb.ResourceIdentifier) (pulumi.Resource, error)

func PulumiUrn

func PulumiUrn(nitricType resourcespb.ResourceType) string

PulumiUrn - Generate a standard Nitric Pulumi URN from a resource identifier

func StreamPulumiDownEngineEvents

func StreamPulumiDownEngineEvents(stream deploymentspb.Deployment_DownServer, pulumiEventsChan <-chan events.EngineEvent) (err error)

func StreamPulumiUpEngineEvents

func StreamPulumiUpEngineEvents(stream deploymentspb.Deployment_UpServer, pulumiEventsChan <-chan events.EngineEvent) error

Types

type DataNode

type DataNode = Node[ResourceData]

type DataTree

type DataTree = Tree[ResourceData]

type DownStreamMessageWriter

type DownStreamMessageWriter struct {
	Stream deploy.Deployment_DownServer
}

func (*DownStreamMessageWriter) Write

func (s *DownStreamMessageWriter) Write(bytes []byte) (int, error)

type NitricPulumiResource

type NitricPulumiResource[T any] struct {
	Id     *resourcespb.ResourceIdentifier
	Config T
}

type NitricPulumiServiceConfig

type NitricPulumiServiceConfig struct {
	*deploymentspb.Service
	// contains filtered or unexported fields
}

func (*NitricPulumiServiceConfig) Env

func (*NitricPulumiServiceConfig) SetEnv

func (n *NitricPulumiServiceConfig) SetEnv(key string, value pulumi.StringInput)

type NitricResource

type NitricResource struct {
	pulumi.ResourceState
	Name string
	Type resourcespb.ResourceType
}

NitricResource - A logical Pulumi resources that represents a Nitric resource used to group concrete provider resources used to fulfill nitric resource deployments.

type Node

type Node[T any] struct {
	Id       string
	Data     *T
	Parent   *Node[T]
	Children []*Node[T]
}

func (*Node[T]) AddChild

func (n *Node[T]) AddChild(node *Node[T])

func (*Node[T]) FindParent

func (n *Node[T]) FindParent(fn func(n *Node[T]) bool) *Node[T]

FindParent - finds the first parent node that matches the given function

type PulumiData

type PulumiData struct {
	Urn string
	// Name   string
	Type        string
	Status      ResourceStatus
	StartTime   time.Time
	EndTime     time.Time
	LastMessage string
}

func (PulumiData) Name

func (pd PulumiData) Name() string

type ResourceData

type ResourceData struct {
	// contains filtered or unexported fields
}

type ResourceStatus

type ResourceStatus int

type Tree

type Tree[T any] struct {
	Root *Node[T]
}

func (*Tree[T]) FindNode

func (t *Tree[T]) FindNode(id string) *Node[T]

Find node from root

type UpStreamMessageWriter

type UpStreamMessageWriter struct {
	Stream deploy.Deployment_UpServer
}

func (*UpStreamMessageWriter) Write

func (s *UpStreamMessageWriter) Write(bytes []byte) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL