conf

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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) Descriptor() ([]byte, []int)

Deprecated: Use Bootstrap.ProtoReflect.Descriptor instead.

func (*Bootstrap) GetClients

func (x *Bootstrap) GetClients() map[string]*ClientConfig

func (*Bootstrap) GetServers

func (x *Bootstrap) GetServers() []*v1.Server

func (*Bootstrap) ProtoMessage

func (*Bootstrap) ProtoMessage()

func (*Bootstrap) ProtoReflect

func (x *Bootstrap) ProtoReflect() protoreflect.Message

func (*Bootstrap) Reset

func (x *Bootstrap) Reset()

func (*Bootstrap) String

func (x *Bootstrap) String() string

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

Jump to

Keyboard shortcuts

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