Documentation
¶
Index ¶
- Variables
- type Bootstrap
- func (*Bootstrap) Descriptor() ([]byte, []int)deprecated
- func (x *Bootstrap) GetClients() map[string]*ClientConfig
- func (x *Bootstrap) GetServers() []*v1.Server
- func (*Bootstrap) ProtoMessage()
- func (x *Bootstrap) ProtoReflect() protoreflect.Message
- func (x *Bootstrap) Reset()
- func (x *Bootstrap) String() string
- type ClientConfig
- func (*ClientConfig) Descriptor() ([]byte, []int)deprecated
- func (x *ClientConfig) GetEndpoint() *v11.Endpoint
- func (x *ClientConfig) GetTransport() *v1.Client
- func (*ClientConfig) ProtoMessage()
- func (x *ClientConfig) ProtoReflect() protoreflect.Message
- func (x *ClientConfig) Reset()
- func (x *ClientConfig) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_protos_api_gateway_bootstrap_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Bootstrap ¶
type Bootstrap struct {
// Server configuration list
// Gateways typically expose multiple server interfaces, for example:
// - HTTP RESTful API for external access
// - gRPC interface
// - WebSocket service
Servers []*v1.Server `protobuf:"bytes,1,rep,name=servers,proto3" json:"servers,omitempty"`
// Downstream client configuration mapping
// The key is the logical name of the client, used to reference specific clients in code
// For example:
// - "user-service-client"
// - "order-service-client"
Clients map[string]*ClientConfig `` /* 141-byte string literal not displayed */
// contains filtered or unexported fields
}
Bootstrap is the top-level configuration for an API Gateway This configuration initializes an API Gateway service that can provide multiple server interfaces and call multiple downstream microservices
func (*Bootstrap) Descriptor
deprecated
func (*Bootstrap) GetClients ¶
func (x *Bootstrap) GetClients() map[string]*ClientConfig
func (*Bootstrap) GetServers ¶
func (*Bootstrap) ProtoMessage ¶
func (*Bootstrap) ProtoMessage()
func (*Bootstrap) ProtoReflect ¶
func (x *Bootstrap) ProtoReflect() protoreflect.Message
type ClientConfig ¶
type ClientConfig struct {
// Business-level client configuration
// Mainly configures how to discover and select service instances, for example:
// - Service discovery method (direct, DNS, Consul, etc.)
// - Load balancing strategy
// - Circuit breaking and fallback configuration
Endpoint *v11.Endpoint `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
// Transport-level client configuration
// Mainly configures how to communicate with selected service instances, for example:
// - Communication protocol (HTTP/gRPC)
// - Timeout settings
// - Retry policy
// - TLS configuration
Transport *v1.Client `protobuf:"bytes,2,opt,name=transport,proto3" json:"transport,omitempty"`
// contains filtered or unexported fields
}
ClientConfig combines all configurations needed for a client It includes both business-level and transport-level configurations
func (*ClientConfig) Descriptor
deprecated
func (*ClientConfig) Descriptor() ([]byte, []int)
Deprecated: Use ClientConfig.ProtoReflect.Descriptor instead.
func (*ClientConfig) GetEndpoint ¶
func (x *ClientConfig) GetEndpoint() *v11.Endpoint
func (*ClientConfig) GetTransport ¶
func (x *ClientConfig) GetTransport() *v1.Client
func (*ClientConfig) ProtoMessage ¶
func (*ClientConfig) ProtoMessage()
func (*ClientConfig) ProtoReflect ¶
func (x *ClientConfig) ProtoReflect() protoreflect.Message
func (*ClientConfig) Reset ¶
func (x *ClientConfig) Reset()
func (*ClientConfig) String ¶
func (x *ClientConfig) String() string
Click to show internal directories.
Click to hide internal directories.