target_json

package
v0.51.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveTargetMapYAML

func ResolveTargetMapYAML(ctx context.Context, b bus.Bus, data []byte) (map[string]*target.Target, error)

ResolveYAML parses the YAML target map and resolves it on a bus.

func ResolveYAML

func ResolveYAML(ctx context.Context, b bus.Bus, data []byte) (*target.Target, error)

ResolveYAML parses the YAML target and resolves it on a bus.

Types

type Target

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

Target implements the JSON unmarshaling and marshaling logic for a Target. Resolve constructs the controller configs, looking up the types from the bus.

func UnmarshalYAML

func UnmarshalYAML(data []byte) (*Target, error)

UnmarshalYAML unmarshals YAML to a Target.

func (*Target) MarshalJSON

func (c *Target) MarshalJSON() ([]byte, error)

MarshalJSON marshals a target JSON blob.

func (*Target) MarshalYAML

func (c *Target) MarshalYAML() ([]byte, error)

MarshalYAML marshals the container contents to yaml.

func (*Target) ResolveProto

func (c *Target) ResolveProto(ctx context.Context, b bus.Bus) (*target.Target, error)

ResolveProto constructs the protobuf representation from the JSON parse data.

func (*Target) SetTarget

func (c *Target) SetTarget(ctx context.Context, b bus.Bus, pb *target.Target) error

SetTarget sets the target to marshal, resolving the controller config.

func (*Target) UnmarshalJSON

func (c *Target) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals a target JSON blob pushing the data into the pending parse buffers.

func (*Target) UnmarshalYAML

func (c *Target) UnmarshalYAML(data []byte) error

UnmarshalYAML unmarshals the yaml to the target container.

type TargetMap

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

TargetMap implements the JSON unmarshaling and marshaling logic for a map of targets. Resolve constructs the controller configs, looking up the types.

func UnmarshalTargetMapYAML

func UnmarshalTargetMapYAML(data []byte) (*TargetMap, error)

UnmarshalYAML unmarshals YAML to a TargetMap.

func (*TargetMap) MarshalJSON

func (c *TargetMap) MarshalJSON() ([]byte, error)

MarshalJSON marshals a target JSON blob.

func (*TargetMap) MarshalYAML

func (c *TargetMap) MarshalYAML() ([]byte, error)

MarshalYAML marshals the container contents to yaml.

func (*TargetMap) ResolveProto

func (c *TargetMap) ResolveProto(ctx context.Context, b bus.Bus) (map[string]*target.Target, error)

ResolveProto constructs the protobuf representation from the JSON parse data.

func (*TargetMap) SetTargetMap

func (c *TargetMap) SetTargetMap(ctx context.Context, b bus.Bus, pb map[string]*target.Target) error

SetTargetMap sets the target to marshal, resolving the controller config.

func (*TargetMap) UnmarshalJSON

func (c *TargetMap) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals a target JSON blob pushing the data into the pending parse buffers.

func (*TargetMap) UnmarshalYAML

func (c *TargetMap) UnmarshalYAML(data []byte) error

UnmarshalYAML unmarshals the yaml to the target container.

Jump to

Keyboard shortcuts

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