Documentation
¶
Index ¶
- Variables
- type Client
- func (*Client) Descriptor() ([]byte, []int)deprecated
- func (x *Client) GetCustomize() *structpb.Struct
- func (x *Client) GetGrpc() *v1.Client
- func (x *Client) GetHttp() *v11.Client
- func (x *Client) GetName() string
- func (x *Client) GetProtocol() string
- func (*Client) ProtoMessage()
- func (x *Client) ProtoReflect() protoreflect.Message
- func (x *Client) Reset()
- func (x *Client) String() string
- func (m *Client) Validate() error
- func (m *Client) ValidateAll() error
- type ClientMultiError
- type ClientValidationError
- type Clients
- func (*Clients) Descriptor() ([]byte, []int)deprecated
- func (x *Clients) GetActive() string
- func (x *Clients) GetClients() []*Client
- func (x *Clients) GetDefault() string
- func (*Clients) ProtoMessage()
- func (x *Clients) ProtoReflect() protoreflect.Message
- func (x *Clients) Reset()
- func (x *Clients) String() string
- func (m *Clients) Validate() error
- func (m *Clients) ValidateAll() error
- type ClientsMultiError
- type ClientsValidationError
- type Server
- func (*Server) Descriptor() ([]byte, []int)deprecated
- func (x *Server) GetCustomize() *structpb.Struct
- func (x *Server) GetGrpc() *v1.Server
- func (x *Server) GetHttp() *v11.Server
- func (x *Server) GetName() string
- func (x *Server) GetProtocol() string
- func (x *Server) GetWebsocket() *v12.Server
- func (*Server) ProtoMessage()
- func (x *Server) ProtoReflect() protoreflect.Message
- func (x *Server) Reset()
- func (x *Server) String() string
- func (m *Server) Validate() error
- func (m *Server) ValidateAll() error
- type ServerMultiError
- type ServerValidationError
- type Servers
- func (*Servers) Descriptor() ([]byte, []int)deprecated
- func (x *Servers) GetServers() []*Server
- func (*Servers) ProtoMessage()
- func (x *Servers) ProtoReflect() protoreflect.Message
- func (x *Servers) Reset()
- func (x *Servers) String() string
- func (m *Servers) Validate() error
- func (m *Servers) ValidateAll() error
- type ServersMultiError
- type ServersValidationError
Constants ¶
This section is empty.
Variables ¶
var File_runtime_transport_v1_transport_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// name is the logical name for this client configuration.
// It is used to uniquely identify this client dependency in the application.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// protocol is the name of the transport protocol to use.
// e.g., "grpc", "http", "websocket". This name is used to look up a registered ProtocolFactory.
Protocol string `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"`
// gRPC client configuration.
Grpc *v1.Client `protobuf:"bytes,3,opt,name=grpc,proto3,oneof" json:"grpc,omitempty"`
// HTTP client configuration.
Http *v11.Client `protobuf:"bytes,4,opt,name=http,proto3,oneof" json:"http,omitempty"`
// customize is used for non-standard or user-defined transport protocols.
Customize *structpb.Struct `protobuf:"bytes,100,opt,name=customize,proto3,oneof" json:"customize,omitempty"`
// contains filtered or unexported fields
}
Client is a generic container for a single client-side transport configuration.
func (*Client) Descriptor
deprecated
func (*Client) GetCustomize ¶ added in v0.2.8
func (*Client) GetProtocol ¶
func (*Client) ProtoMessage ¶
func (*Client) ProtoMessage()
func (*Client) ProtoReflect ¶
func (x *Client) ProtoReflect() protoreflect.Message
func (*Client) Validate ¶
Validate checks the field values on Client with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Client) ValidateAll ¶
ValidateAll checks the field values on Client with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ClientMultiError, or nil if none found.
type ClientMultiError ¶
type ClientMultiError []error
ClientMultiError is an error wrapping multiple validation errors returned by Client.ValidateAll() if the designated constraints aren't met.
func (ClientMultiError) AllErrors ¶
func (m ClientMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ClientMultiError) Error ¶
func (m ClientMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ClientValidationError ¶
type ClientValidationError struct {
// contains filtered or unexported fields
}
ClientValidationError is the validation error returned by Client.Validate if the designated constraints aren't met.
func (ClientValidationError) Cause ¶
func (e ClientValidationError) Cause() error
Cause function returns cause value.
func (ClientValidationError) Error ¶
func (e ClientValidationError) Error() string
Error satisfies the builtin error interface
func (ClientValidationError) ErrorName ¶
func (e ClientValidationError) ErrorName() string
ErrorName returns error name.
func (ClientValidationError) Field ¶
func (e ClientValidationError) Field() string
Field function returns field value.
func (ClientValidationError) Key ¶
func (e ClientValidationError) Key() bool
Key function returns key value.
func (ClientValidationError) Reason ¶
func (e ClientValidationError) Reason() string
Reason function returns reason value.
type Clients ¶ added in v0.2.7
type Clients struct {
// default is the name of the default client configuration to use from the `clients` list.
// If not set, the application can use a predefined default or infer one.
Default *string `protobuf:"bytes,1,opt,name=default,proto3,oneof" json:"default,omitempty"`
// active is the name of the active client configuration to use from the `clients` list.
// If set, it overrides the `default` selection.
Active *string `protobuf:"bytes,2,opt,name=active,proto3,oneof" json:"active,omitempty"`
// clients is a list of all available client configurations.
Clients []*Client `protobuf:"bytes,3,rep,name=clients,proto3" json:"clients,omitempty"`
// contains filtered or unexported fields
}
Clients defines a collection of client configurations for services that this service depends on. This structure follows the "Broker Pattern" to avoid using maps, providing a clear and explicit way to manage multiple named client instances.
func (*Clients) Descriptor
deprecated
added in
v0.2.7
func (*Clients) GetClients ¶ added in v0.2.7
func (*Clients) GetDefault ¶ added in v0.2.8
func (*Clients) ProtoMessage ¶ added in v0.2.7
func (*Clients) ProtoMessage()
func (*Clients) ProtoReflect ¶ added in v0.2.7
func (x *Clients) ProtoReflect() protoreflect.Message
func (*Clients) Validate ¶ added in v0.2.7
Validate checks the field values on Clients with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Clients) ValidateAll ¶ added in v0.2.7
ValidateAll checks the field values on Clients with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ClientsMultiError, or nil if none found.
type ClientsMultiError ¶ added in v0.2.7
type ClientsMultiError []error
ClientsMultiError is an error wrapping multiple validation errors returned by Clients.ValidateAll() if the designated constraints aren't met.
func (ClientsMultiError) AllErrors ¶ added in v0.2.7
func (m ClientsMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ClientsMultiError) Error ¶ added in v0.2.7
func (m ClientsMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ClientsValidationError ¶ added in v0.2.7
type ClientsValidationError struct {
// contains filtered or unexported fields
}
ClientsValidationError is the validation error returned by Clients.Validate if the designated constraints aren't met.
func (ClientsValidationError) Cause ¶ added in v0.2.7
func (e ClientsValidationError) Cause() error
Cause function returns cause value.
func (ClientsValidationError) Error ¶ added in v0.2.7
func (e ClientsValidationError) Error() string
Error satisfies the builtin error interface
func (ClientsValidationError) ErrorName ¶ added in v0.2.7
func (e ClientsValidationError) ErrorName() string
ErrorName returns error name.
func (ClientsValidationError) Field ¶ added in v0.2.7
func (e ClientsValidationError) Field() string
Field function returns field value.
func (ClientsValidationError) Key ¶ added in v0.2.7
func (e ClientsValidationError) Key() bool
Key function returns key value.
func (ClientsValidationError) Reason ¶ added in v0.2.7
func (e ClientsValidationError) Reason() string
Reason function returns reason value.
type Server ¶
type Server struct {
// name is the logical name for this server configuration.
// It is used to identify this server in the application's configuration.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// protocol is the name of the transport protocol to use.
// e.g., "grpc", "http", "websocket". This name is used to look up a registered ProtocolFactory.
Protocol string `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"`
// gRPC server configuration.
Grpc *v1.Server `protobuf:"bytes,3,opt,name=grpc,proto3,oneof" json:"grpc,omitempty"`
// HTTP server configuration.
Http *v11.Server `protobuf:"bytes,4,opt,name=http,proto3,oneof" json:"http,omitempty"`
// WebSocket server configuration.
Websocket *v12.Server `protobuf:"bytes,5,opt,name=websocket,proto3,oneof" json:"websocket,omitempty"`
// customize is used for non-standard or user-defined transport protocols.
// It allows for flexible configuration without modifying this core proto file.
Customize *structpb.Struct `protobuf:"bytes,100,opt,name=customize,proto3,oneof" json:"customize,omitempty"`
// contains filtered or unexported fields
}
Server is a generic container for a single server-side transport configuration. It uses optional fields to represent different protocol types, avoiding the use of `oneof`.
func (*Server) Descriptor
deprecated
func (*Server) GetCustomize ¶ added in v0.2.8
func (*Server) GetProtocol ¶
func (*Server) GetWebsocket ¶ added in v0.2.8
func (*Server) ProtoMessage ¶
func (*Server) ProtoMessage()
func (*Server) ProtoReflect ¶
func (x *Server) ProtoReflect() protoreflect.Message
func (*Server) Validate ¶
Validate checks the field values on Server with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Server) ValidateAll ¶
ValidateAll checks the field values on Server with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ServerMultiError, or nil if none found.
type ServerMultiError ¶
type ServerMultiError []error
ServerMultiError is an error wrapping multiple validation errors returned by Server.ValidateAll() if the designated constraints aren't met.
func (ServerMultiError) AllErrors ¶
func (m ServerMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ServerMultiError) Error ¶
func (m ServerMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ServerValidationError ¶
type ServerValidationError struct {
// contains filtered or unexported fields
}
ServerValidationError is the validation error returned by Server.Validate if the designated constraints aren't met.
func (ServerValidationError) Cause ¶
func (e ServerValidationError) Cause() error
Cause function returns cause value.
func (ServerValidationError) Error ¶
func (e ServerValidationError) Error() string
Error satisfies the builtin error interface
func (ServerValidationError) ErrorName ¶
func (e ServerValidationError) ErrorName() string
ErrorName returns error name.
func (ServerValidationError) Field ¶
func (e ServerValidationError) Field() string
Field function returns field value.
func (ServerValidationError) Key ¶
func (e ServerValidationError) Key() bool
Key function returns key value.
func (ServerValidationError) Reason ¶
func (e ServerValidationError) Reason() string
Reason function returns reason value.
type Servers ¶ added in v0.2.7
type Servers struct {
// servers is a list of all available server configurations.
// Each server in this list will typically be started by the application.
Servers []*Server `protobuf:"bytes,1,rep,name=servers,proto3" json:"servers,omitempty"`
// contains filtered or unexported fields
}
Servers defines a collection of server configurations. This message aggregates all server instances that an application needs to run. It does not include `default` or `active` fields, as all configured servers are typically started.
func (*Servers) Descriptor
deprecated
added in
v0.2.7
func (*Servers) GetServers ¶ added in v0.2.7
func (*Servers) ProtoMessage ¶ added in v0.2.7
func (*Servers) ProtoMessage()
func (*Servers) ProtoReflect ¶ added in v0.2.7
func (x *Servers) ProtoReflect() protoreflect.Message
func (*Servers) Validate ¶ added in v0.2.7
Validate checks the field values on Servers with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Servers) ValidateAll ¶ added in v0.2.7
ValidateAll checks the field values on Servers with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ServersMultiError, or nil if none found.
type ServersMultiError ¶ added in v0.2.7
type ServersMultiError []error
ServersMultiError is an error wrapping multiple validation errors returned by Servers.ValidateAll() if the designated constraints aren't met.
func (ServersMultiError) AllErrors ¶ added in v0.2.7
func (m ServersMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ServersMultiError) Error ¶ added in v0.2.7
func (m ServersMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ServersValidationError ¶ added in v0.2.7
type ServersValidationError struct {
// contains filtered or unexported fields
}
ServersValidationError is the validation error returned by Servers.Validate if the designated constraints aren't met.
func (ServersValidationError) Cause ¶ added in v0.2.7
func (e ServersValidationError) Cause() error
Cause function returns cause value.
func (ServersValidationError) Error ¶ added in v0.2.7
func (e ServersValidationError) Error() string
Error satisfies the builtin error interface
func (ServersValidationError) ErrorName ¶ added in v0.2.7
func (e ServersValidationError) ErrorName() string
ErrorName returns error name.
func (ServersValidationError) Field ¶ added in v0.2.7
func (e ServersValidationError) Field() string
Field function returns field value.
func (ServersValidationError) Key ¶ added in v0.2.7
func (e ServersValidationError) Key() bool
Key function returns key value.
func (ServersValidationError) Reason ¶ added in v0.2.7
func (e ServersValidationError) Reason() string
Reason function returns reason value.