Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Write ¶
func Write(ctx context.Context, ewd *ExpandedWriterData, ri icontext.ReadConfigProvider) (list []error)
Write write the config by the all writers
Types ¶
type ExpandedWriterConfig ¶
type ExpandedWriterConfig struct {
Nacos *NacosConfig `json:"nacos"`
}
ExpandedWriterConfig define the supported output ways.
func ParseExpandedWriterConfig ¶
func ParseExpandedWriterConfig(template cue.Value) ExpandedWriterConfig
ParseExpandedWriterConfig parse the expanded writer config from the template value
type ExpandedWriterData ¶
type ExpandedWriterData struct {
Nacos *NacosData `json:"nacos"`
}
ExpandedWriterData the data for the expanded writer
func RenderForExpandedWriter ¶
func RenderForExpandedWriter(ewc ExpandedWriterConfig, template script.CUE, context icontext.ConfigRenderContext, properties map[string]interface{}) (*ExpandedWriterData, error)
RenderForExpandedWriter render the configuration for all expanded writers
type NacosConfig ¶
type NacosConfig struct {
Endpoint ConfigRef `json:"endpoint"`
// Format defines the format in which Data will be output.
Format string `json:"format"`
Metadata NacosConfigMetadata `json:"metadata"`
}
NacosConfig defines the nacos output
type NacosConfigMetadata ¶
type NacosConfigMetadata struct {
DataID string `json:"dataId"`
Group string `json:"group"`
NamespaceID string `json:"namespaceId"`
AppName string `json:"appName,omitempty"`
Tenant string `json:"tenant,omitempty"`
Tag string `json:"tag,omitempty"`
}
NacosConfigMetadata the metadata of the nacos config
type NacosData ¶
type NacosData struct {
NacosConfig
Content []byte `json:"-"`
Client config_client.IConfigClient `json:"-"`
}
NacosData merge the nacos endpoint config and the rendered data
Click to show internal directories.
Click to hide internal directories.