transportv1

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_runtime_transport_v1_grpc_proto protoreflect.FileDescriptor
View Source
var File_runtime_transport_v1_http_proto protoreflect.FileDescriptor
View Source
var File_runtime_transport_v1_selector_proto protoreflect.FileDescriptor
View Source
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.
	// If empty, the protocol name may be used as a default identifier.
	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". 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 *GrpcClientConfig `protobuf:"bytes,3,opt,name=grpc,proto3,oneof" json:"grpc,omitempty"`
	// HTTP client configuration.
	Http *HttpClientConfig `protobuf:"bytes,4,opt,name=http,proto3,oneof" json:"http,omitempty"`
	// custom_config is used for non-standard or user-defined transport protocols.
	CustomConfig *structpb.Struct `protobuf:"bytes,5,opt,name=custom_config,json=customConfig,proto3,oneof" json:"custom_config,omitempty"`
	// contains filtered or unexported fields
}

Client is a generic container for various client-side transport configurations.

func (*Client) Descriptor deprecated

func (*Client) Descriptor() ([]byte, []int)

Deprecated: Use Client.ProtoReflect.Descriptor instead.

func (*Client) GetCustomConfig

func (x *Client) GetCustomConfig() *structpb.Struct

func (*Client) GetGrpc

func (x *Client) GetGrpc() *GrpcClientConfig

func (*Client) GetHttp

func (x *Client) GetHttp() *HttpClientConfig

func (*Client) GetName

func (x *Client) GetName() string

func (*Client) GetProtocol

func (x *Client) GetProtocol() string

func (*Client) ProtoMessage

func (*Client) ProtoMessage()

func (*Client) ProtoReflect

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

func (*Client) Reset

func (x *Client) Reset()

func (*Client) String

func (x *Client) String() string

func (*Client) Validate

func (m *Client) Validate() error

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

func (m *Client) ValidateAll() error

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 {

	// clients is a list of client configurations for services that this service depends on.
	// This list will be converted into a map in the application's bootstrap logic,
	// using the 'name' field from each Client message as the key.
	Clients []*Client `protobuf:"bytes,1,rep,name=clients,proto3" json:"clients,omitempty"`
	// contains filtered or unexported fields
}

Clients defines a list of client configurations for services that this service depends on. This list will be converted into a map in the application's bootstrap logic, using the 'name' field from each Client message as the key.

func (*Clients) Descriptor deprecated added in v0.2.7

func (*Clients) Descriptor() ([]byte, []int)

Deprecated: Use Clients.ProtoReflect.Descriptor instead.

func (*Clients) GetClients added in v0.2.7

func (x *Clients) GetClients() []*Client

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) Reset added in v0.2.7

func (x *Clients) Reset()

func (*Clients) String added in v0.2.7

func (x *Clients) String() string

func (*Clients) Validate added in v0.2.7

func (m *Clients) Validate() error

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

func (m *Clients) ValidateAll() error

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 GrpcClientConfig

type GrpcClientConfig struct {

	// endpoint is the target to connect to.
	// It can be a direct address or a discovery service URI.
	// e.g., "direct://127.0.0.1:9000" or "discovery:///your-service-name"
	Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	// timeout is the request timeout for a single RPC call.
	Timeout *durationpb.Duration `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// middlewares is a list of middleware names to be applied to the client.
	Middlewares []string `protobuf:"bytes,3,rep,name=middlewares,proto3" json:"middlewares,omitempty"`
	// selector defines the node selection strategy for the client.
	Selector *SelectorConfig `protobuf:"bytes,4,opt,name=selector,proto3" json:"selector,omitempty"`
	// discovery_name specifies the name of the discovery client to use from the application container.
	// If empty, and multiple discovery clients are available, an error will be returned.
	DiscoveryName *string `protobuf:"bytes,5,opt,name=discovery_name,json=discoveryName,proto3,oneof" json:"discovery_name,omitempty"`
	// tls_config defines the TLS settings for the gRPC client.
	TlsConfig *v1.TLSConfig `protobuf:"bytes,6,opt,name=tls_config,json=tlsConfig,proto3,oneof" json:"tls_config,omitempty"`
	// contains filtered or unexported fields
}

GrpcClientConfig defines the core configuration for creating a Kratos gRPC client.

func (*GrpcClientConfig) Descriptor deprecated

func (*GrpcClientConfig) Descriptor() ([]byte, []int)

Deprecated: Use GrpcClientConfig.ProtoReflect.Descriptor instead.

func (*GrpcClientConfig) GetDiscoveryName

func (x *GrpcClientConfig) GetDiscoveryName() string

func (*GrpcClientConfig) GetEndpoint

func (x *GrpcClientConfig) GetEndpoint() string

func (*GrpcClientConfig) GetMiddlewares

func (x *GrpcClientConfig) GetMiddlewares() []string

func (*GrpcClientConfig) GetSelector

func (x *GrpcClientConfig) GetSelector() *SelectorConfig

func (*GrpcClientConfig) GetTimeout

func (x *GrpcClientConfig) GetTimeout() *durationpb.Duration

func (*GrpcClientConfig) GetTlsConfig

func (x *GrpcClientConfig) GetTlsConfig() *v1.TLSConfig

func (*GrpcClientConfig) ProtoMessage

func (*GrpcClientConfig) ProtoMessage()

func (*GrpcClientConfig) ProtoReflect

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

func (*GrpcClientConfig) Reset

func (x *GrpcClientConfig) Reset()

func (*GrpcClientConfig) String

func (x *GrpcClientConfig) String() string

func (*GrpcClientConfig) Validate

func (m *GrpcClientConfig) Validate() error

Validate checks the field values on GrpcClientConfig 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 (*GrpcClientConfig) ValidateAll

func (m *GrpcClientConfig) ValidateAll() error

ValidateAll checks the field values on GrpcClientConfig 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 GrpcClientConfigMultiError, or nil if none found.

type GrpcClientConfigMultiError

type GrpcClientConfigMultiError []error

GrpcClientConfigMultiError is an error wrapping multiple validation errors returned by GrpcClientConfig.ValidateAll() if the designated constraints aren't met.

func (GrpcClientConfigMultiError) AllErrors

func (m GrpcClientConfigMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GrpcClientConfigMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GrpcClientConfigValidationError

type GrpcClientConfigValidationError struct {
	// contains filtered or unexported fields
}

GrpcClientConfigValidationError is the validation error returned by GrpcClientConfig.Validate if the designated constraints aren't met.

func (GrpcClientConfigValidationError) Cause

Cause function returns cause value.

func (GrpcClientConfigValidationError) Error

Error satisfies the builtin error interface

func (GrpcClientConfigValidationError) ErrorName

ErrorName returns error name.

func (GrpcClientConfigValidationError) Field

Field function returns field value.

func (GrpcClientConfigValidationError) Key

Key function returns key value.

func (GrpcClientConfigValidationError) Reason

Reason function returns reason value.

type GrpcServerConfig

type GrpcServerConfig struct {

	// network is the network type for the server to listen on.
	// e.g., "tcp", "unix"
	Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"`
	// addr is the address for the server to listen on.
	// e.g., "0.0.0.0:9000"
	Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
	// timeout is the request handling timeout.
	Timeout *durationpb.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// middlewares is a list of middleware names to be applied to the server.
	// The framework will look up these names in a middleware provider.
	Middlewares []string `protobuf:"bytes,4,rep,name=middlewares,proto3" json:"middlewares,omitempty"`
	// tls_config defines the TLS settings for the gRPC server.
	TlsConfig *v1.TLSConfig `protobuf:"bytes,5,opt,name=tls_config,json=tlsConfig,proto3,oneof" json:"tls_config,omitempty"`
	// contains filtered or unexported fields
}

GrpcServerConfig defines the core configuration for a Kratos gRPC server.

func (*GrpcServerConfig) Descriptor deprecated

func (*GrpcServerConfig) Descriptor() ([]byte, []int)

Deprecated: Use GrpcServerConfig.ProtoReflect.Descriptor instead.

func (*GrpcServerConfig) GetAddr

func (x *GrpcServerConfig) GetAddr() string

func (*GrpcServerConfig) GetMiddlewares

func (x *GrpcServerConfig) GetMiddlewares() []string

func (*GrpcServerConfig) GetNetwork

func (x *GrpcServerConfig) GetNetwork() string

func (*GrpcServerConfig) GetTimeout

func (x *GrpcServerConfig) GetTimeout() *durationpb.Duration

func (*GrpcServerConfig) GetTlsConfig

func (x *GrpcServerConfig) GetTlsConfig() *v1.TLSConfig

func (*GrpcServerConfig) ProtoMessage

func (*GrpcServerConfig) ProtoMessage()

func (*GrpcServerConfig) ProtoReflect

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

func (*GrpcServerConfig) Reset

func (x *GrpcServerConfig) Reset()

func (*GrpcServerConfig) String

func (x *GrpcServerConfig) String() string

func (*GrpcServerConfig) Validate

func (m *GrpcServerConfig) Validate() error

Validate checks the field values on GrpcServerConfig 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 (*GrpcServerConfig) ValidateAll

func (m *GrpcServerConfig) ValidateAll() error

ValidateAll checks the field values on GrpcServerConfig 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 GrpcServerConfigMultiError, or nil if none found.

type GrpcServerConfigMultiError

type GrpcServerConfigMultiError []error

GrpcServerConfigMultiError is an error wrapping multiple validation errors returned by GrpcServerConfig.ValidateAll() if the designated constraints aren't met.

func (GrpcServerConfigMultiError) AllErrors

func (m GrpcServerConfigMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GrpcServerConfigMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GrpcServerConfigValidationError

type GrpcServerConfigValidationError struct {
	// contains filtered or unexported fields
}

GrpcServerConfigValidationError is the validation error returned by GrpcServerConfig.Validate if the designated constraints aren't met.

func (GrpcServerConfigValidationError) Cause

Cause function returns cause value.

func (GrpcServerConfigValidationError) Error

Error satisfies the builtin error interface

func (GrpcServerConfigValidationError) ErrorName

ErrorName returns error name.

func (GrpcServerConfigValidationError) Field

Field function returns field value.

func (GrpcServerConfigValidationError) Key

Key function returns key value.

func (GrpcServerConfigValidationError) Reason

Reason function returns reason value.

type HttpClientConfig

type HttpClientConfig struct {

	// endpoint is the target to connect to.
	// It can be a direct address or a discovery service URI.
	// e.g., "http://127.0.0.1:8000" or "discovery:///your-service-name"
	Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	// timeout is the request timeout for a single HTTP call.
	Timeout *durationpb.Duration `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// middlewares is a list of middleware names to be applied to the client.
	Middlewares []string `protobuf:"bytes,3,rep,name=middlewares,proto3" json:"middlewares,omitempty"`
	// selector defines the node selection strategy for the client.
	Selector *SelectorConfig `protobuf:"bytes,4,opt,name=selector,proto3" json:"selector,omitempty"`
	// discovery_name is the name of the discovery client to use for service discovery.
	// This is used when the endpoint is a discovery service URI.
	DiscoveryName string `protobuf:"bytes,5,opt,name=discovery_name,json=discoveryName,proto3" json:"discovery_name,omitempty"`
	// tls_config defines the TLS settings for the HTTP client.
	TlsConfig *v1.TLSConfig `protobuf:"bytes,6,opt,name=tls_config,json=tlsConfig,proto3,oneof" json:"tls_config,omitempty"`
	// dial_timeout is the timeout for establishing a connection.
	DialTimeout *durationpb.Duration `protobuf:"bytes,7,opt,name=dial_timeout,json=dialTimeout,proto3,oneof" json:"dial_timeout,omitempty"`
	// contains filtered or unexported fields
}

HttpClientConfig defines the core configuration for creating a Kratos HTTP client.

func (*HttpClientConfig) Descriptor deprecated

func (*HttpClientConfig) Descriptor() ([]byte, []int)

Deprecated: Use HttpClientConfig.ProtoReflect.Descriptor instead.

func (*HttpClientConfig) GetDialTimeout

func (x *HttpClientConfig) GetDialTimeout() *durationpb.Duration

func (*HttpClientConfig) GetDiscoveryName

func (x *HttpClientConfig) GetDiscoveryName() string

func (*HttpClientConfig) GetEndpoint

func (x *HttpClientConfig) GetEndpoint() string

func (*HttpClientConfig) GetMiddlewares

func (x *HttpClientConfig) GetMiddlewares() []string

func (*HttpClientConfig) GetSelector

func (x *HttpClientConfig) GetSelector() *SelectorConfig

func (*HttpClientConfig) GetTimeout

func (x *HttpClientConfig) GetTimeout() *durationpb.Duration

func (*HttpClientConfig) GetTlsConfig

func (x *HttpClientConfig) GetTlsConfig() *v1.TLSConfig

func (*HttpClientConfig) ProtoMessage

func (*HttpClientConfig) ProtoMessage()

func (*HttpClientConfig) ProtoReflect

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

func (*HttpClientConfig) Reset

func (x *HttpClientConfig) Reset()

func (*HttpClientConfig) String

func (x *HttpClientConfig) String() string

func (*HttpClientConfig) Validate

func (m *HttpClientConfig) Validate() error

Validate checks the field values on HttpClientConfig 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 (*HttpClientConfig) ValidateAll

func (m *HttpClientConfig) ValidateAll() error

ValidateAll checks the field values on HttpClientConfig 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 HttpClientConfigMultiError, or nil if none found.

type HttpClientConfigMultiError

type HttpClientConfigMultiError []error

HttpClientConfigMultiError is an error wrapping multiple validation errors returned by HttpClientConfig.ValidateAll() if the designated constraints aren't met.

func (HttpClientConfigMultiError) AllErrors

func (m HttpClientConfigMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (HttpClientConfigMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type HttpClientConfigValidationError

type HttpClientConfigValidationError struct {
	// contains filtered or unexported fields
}

HttpClientConfigValidationError is the validation error returned by HttpClientConfig.Validate if the designated constraints aren't met.

func (HttpClientConfigValidationError) Cause

Cause function returns cause value.

func (HttpClientConfigValidationError) Error

Error satisfies the builtin error interface

func (HttpClientConfigValidationError) ErrorName

ErrorName returns error name.

func (HttpClientConfigValidationError) Field

Field function returns field value.

func (HttpClientConfigValidationError) Key

Key function returns key value.

func (HttpClientConfigValidationError) Reason

Reason function returns reason value.

type HttpServerConfig

type HttpServerConfig struct {

	// addr is the address for the server to listen on.
	// e.g., "0.0.0.0:8000"
	Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
	// timeout is the request handling timeout.
	Timeout *durationpb.Duration `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// middlewares is a list of middleware names to be applied to the server.
	// The framework will look up these names in a middleware provider.
	Middlewares []string `protobuf:"bytes,3,rep,name=middlewares,proto3" json:"middlewares,omitempty"`
	// tls_config defines the TLS settings for the HTTP server.
	TlsConfig *v1.TLSConfig `protobuf:"bytes,4,opt,name=tls_config,json=tlsConfig,proto3,oneof" json:"tls_config,omitempty"`
	// network specifies the network type, e.g., "tcp", "tcp4", "tcp6".
	Network string `protobuf:"bytes,5,opt,name=network,proto3" json:"network,omitempty"`
	// cors configuration for the HTTP server
	Cors *cors.Cors `protobuf:"bytes,6,opt,name=cors,proto3,oneof" json:"cors,omitempty"`
	// enable_pprof indicates whether to enable pprof debugging endpoints.
	EnablePprof bool `protobuf:"varint,7,opt,name=enable_pprof,json=enablePprof,proto3" json:"enable_pprof,omitempty"`
	// contains filtered or unexported fields
}

HttpServerConfig defines the core configuration for a Kratos HTTP server.

func (*HttpServerConfig) Descriptor deprecated

func (*HttpServerConfig) Descriptor() ([]byte, []int)

Deprecated: Use HttpServerConfig.ProtoReflect.Descriptor instead.

func (*HttpServerConfig) GetAddr

func (x *HttpServerConfig) GetAddr() string

func (*HttpServerConfig) GetCors

func (x *HttpServerConfig) GetCors() *cors.Cors

func (*HttpServerConfig) GetEnablePprof

func (x *HttpServerConfig) GetEnablePprof() bool

func (*HttpServerConfig) GetMiddlewares

func (x *HttpServerConfig) GetMiddlewares() []string

func (*HttpServerConfig) GetNetwork

func (x *HttpServerConfig) GetNetwork() string

func (*HttpServerConfig) GetTimeout

func (x *HttpServerConfig) GetTimeout() *durationpb.Duration

func (*HttpServerConfig) GetTlsConfig

func (x *HttpServerConfig) GetTlsConfig() *v1.TLSConfig

func (*HttpServerConfig) ProtoMessage

func (*HttpServerConfig) ProtoMessage()

func (*HttpServerConfig) ProtoReflect

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

func (*HttpServerConfig) Reset

func (x *HttpServerConfig) Reset()

func (*HttpServerConfig) String

func (x *HttpServerConfig) String() string

func (*HttpServerConfig) Validate

func (m *HttpServerConfig) Validate() error

Validate checks the field values on HttpServerConfig 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 (*HttpServerConfig) ValidateAll

func (m *HttpServerConfig) ValidateAll() error

ValidateAll checks the field values on HttpServerConfig 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 HttpServerConfigMultiError, or nil if none found.

type HttpServerConfigMultiError

type HttpServerConfigMultiError []error

HttpServerConfigMultiError is an error wrapping multiple validation errors returned by HttpServerConfig.ValidateAll() if the designated constraints aren't met.

func (HttpServerConfigMultiError) AllErrors

func (m HttpServerConfigMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (HttpServerConfigMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type HttpServerConfigValidationError

type HttpServerConfigValidationError struct {
	// contains filtered or unexported fields
}

HttpServerConfigValidationError is the validation error returned by HttpServerConfig.Validate if the designated constraints aren't met.

func (HttpServerConfigValidationError) Cause

Cause function returns cause value.

func (HttpServerConfigValidationError) Error

Error satisfies the builtin error interface

func (HttpServerConfigValidationError) ErrorName

ErrorName returns error name.

func (HttpServerConfigValidationError) Field

Field function returns field value.

func (HttpServerConfigValidationError) Key

Key function returns key value.

func (HttpServerConfigValidationError) Reason

Reason function returns reason value.

type SelectorConfig

type SelectorConfig struct {

	// version is a filter for the service version.
	// e.g., "v1.0.0"
	Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

SelectorConfig defines the client-side node selection strategy.

func (*SelectorConfig) Descriptor deprecated

func (*SelectorConfig) Descriptor() ([]byte, []int)

Deprecated: Use SelectorConfig.ProtoReflect.Descriptor instead.

func (*SelectorConfig) GetVersion

func (x *SelectorConfig) GetVersion() string

func (*SelectorConfig) ProtoMessage

func (*SelectorConfig) ProtoMessage()

func (*SelectorConfig) ProtoReflect

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

func (*SelectorConfig) Reset

func (x *SelectorConfig) Reset()

func (*SelectorConfig) String

func (x *SelectorConfig) String() string

func (*SelectorConfig) Validate

func (m *SelectorConfig) Validate() error

Validate checks the field values on SelectorConfig 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 (*SelectorConfig) ValidateAll

func (m *SelectorConfig) ValidateAll() error

ValidateAll checks the field values on SelectorConfig 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 SelectorConfigMultiError, or nil if none found.

type SelectorConfigMultiError

type SelectorConfigMultiError []error

SelectorConfigMultiError is an error wrapping multiple validation errors returned by SelectorConfig.ValidateAll() if the designated constraints aren't met.

func (SelectorConfigMultiError) AllErrors

func (m SelectorConfigMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SelectorConfigMultiError) Error

func (m SelectorConfigMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type SelectorConfigValidationError

type SelectorConfigValidationError struct {
	// contains filtered or unexported fields
}

SelectorConfigValidationError is the validation error returned by SelectorConfig.Validate if the designated constraints aren't met.

func (SelectorConfigValidationError) Cause

Cause function returns cause value.

func (SelectorConfigValidationError) Error

Error satisfies the builtin error interface

func (SelectorConfigValidationError) ErrorName

func (e SelectorConfigValidationError) ErrorName() string

ErrorName returns error name.

func (SelectorConfigValidationError) Field

Field function returns field value.

func (SelectorConfigValidationError) Key

Key function returns key value.

func (SelectorConfigValidationError) Reason

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.
	// If empty, the protocol name may be used as a default identifier.
	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". 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 *GrpcServerConfig `protobuf:"bytes,3,opt,name=grpc,proto3,oneof" json:"grpc,omitempty"`
	// HTTP server configuration.
	Http *HttpServerConfig `protobuf:"bytes,4,opt,name=http,proto3,oneof" json:"http,omitempty"`
	// custom_config is used for non-standard or user-defined transport protocols.
	// It allows for flexible configuration without modifying this core proto file.
	CustomConfig *structpb.Struct `protobuf:"bytes,5,opt,name=custom_config,json=customConfig,proto3,oneof" json:"custom_config,omitempty"`
	// contains filtered or unexported fields
}

Server is a generic container for various server-side transport configurations.

func (*Server) Descriptor deprecated

func (*Server) Descriptor() ([]byte, []int)

Deprecated: Use Server.ProtoReflect.Descriptor instead.

func (*Server) GetCustomConfig

func (x *Server) GetCustomConfig() *structpb.Struct

func (*Server) GetGrpc

func (x *Server) GetGrpc() *GrpcServerConfig

func (*Server) GetHttp

func (x *Server) GetHttp() *HttpServerConfig

func (*Server) GetName added in v0.2.7

func (x *Server) GetName() string

func (*Server) GetProtocol

func (x *Server) GetProtocol() string

func (*Server) ProtoMessage

func (*Server) ProtoMessage()

func (*Server) ProtoReflect

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

func (*Server) Reset

func (x *Server) Reset()

func (*Server) String

func (x *Server) String() string

func (*Server) Validate

func (m *Server) Validate() error

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

func (m *Server) ValidateAll() error

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 server endpoints that this service will expose.
	// A service can listen on multiple protocols simultaneously, e.g., both gRPC and HTTP.
	Servers []*Server `protobuf:"bytes,1,rep,name=servers,proto3" json:"servers,omitempty"`
	// contains filtered or unexported fields
}

Servers defines a complete microservice unit. It encapsulates the service's identity, its server endpoints, its client dependencies, and its middleware configurations.

func (*Servers) Descriptor deprecated added in v0.2.7

func (*Servers) Descriptor() ([]byte, []int)

Deprecated: Use Servers.ProtoReflect.Descriptor instead.

func (*Servers) GetServers added in v0.2.7

func (x *Servers) GetServers() []*Server

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) Reset added in v0.2.7

func (x *Servers) Reset()

func (*Servers) String added in v0.2.7

func (x *Servers) String() string

func (*Servers) Validate added in v0.2.7

func (m *Servers) Validate() error

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

func (m *Servers) ValidateAll() error

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.

Jump to

Keyboard shortcuts

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