Documentation ¶
Index ¶
Constants ¶
View Source
const AppName string = "kbridge"
Variables ¶
View Source
var ConfigJSONSchema string
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Version string `json:"version" yaml:"version" mapstructure:"version"` Server *ServerConfig `json:"server" yaml:"server" mapstructure:"server"` Kafka *KafkaConfig `json:"kafka" yaml:"kafka" mapstructure:"kafka"` Endpoints []*EndpointDefinition `json:"endpoints" yaml:"endpoints" mapstructure:"endpoints"` }
func LoadConfig ¶
func LoadConfigFromFile ¶
type EndpointDefinition ¶
type EndpointDefinition struct { IsGRPC bool `json:"grpc" yaml:"grpc" mapstructure:"grpc"` Path string `json:"path" yaml:"path" mapstructure:"path"` HTTPMethod string `json:"method" yaml:"method" mapstructure:"method"` DataType string `json:"dataType" yaml:"dataType" mapstructure:"dataType"` Passthrough bool `json:"passthrough" yaml:"passthrough" mapstructure:"passthrough"` Kafka *EndpointKafkaConfig `json:"kafka" yaml:"kafka" mapstructure:"kafka"` }
type EndpointKafkaConfig ¶
type EndpointKafkaConfig struct { Topic string `json:"topic" yaml:"topic" mapstructure:"topic"` Partition int `json:"partition" yaml:"partition" mapstructure:"partition"` ReplyTopic string `json:"replyTopic" yaml:"replyTopic" mapstructure:"replyTopic"` ReplyPartition int `json:"replyPartition" yaml:"replyPartition" mapstructure:"replyPartition"` }
type HTTPConfig ¶
type KafkaConfig ¶
type ServerConfig ¶
type ServerConfig struct {
HTTPConfig *HTTPConfig `json:"http" yaml:"http" mapstructure:"http"`
}
Click to show internal directories.
Click to hide internal directories.