Documentation ¶
Index ¶
- Variables
- type Client
- type ClientAnnouncement
- type ClientInfoAuthInfo
- type ClientInfos
- type ConnectedClient
- type Dialer
- type GRPCClientSettings
- type GRPCServerSettings
- type Handler
- type Server
- func (s *Server) Call(context context.Context, pbRequest *protobuf.Request) (*protobuf.Response, error)
- func (s *Server) CanDeliverTo(address *hyper.Address) bool
- func (s *Server) DeliverRequest(request *hyper.Request) (*hyper.Response, error)
- func (s *Server) ServerCall(server protobuf.Hyper_ServerCallServer) error
- func (s *Server) Start() error
- func (s *Server) Stop() error
- type VerifyCredentials
Constants ¶
This section is empty.
Variables ¶
View Source
var AnnouncementForm = forms.Form{ Fields: []forms.Field{ { Name: "name", Validators: []forms.Validator{ forms.IsString{}, }, }, }, }
View Source
var GRPCClientSettingsForm = forms.Form{ Fields: []forms.Field{ { Name: "useProxy", Validators: []forms.Validator{ forms.IsOptional{Default: true}, forms.IsBoolean{}, }, }, { Name: "tls", Validators: []forms.Validator{ forms.IsStringMap{ Form: &tls.TLSSettingsForm, }, }, }, }, }
View Source
var GRPCServerSettingsForm = forms.Form{ Fields: []forms.Field{ { Name: "bind_address", Validators: []forms.Validator{ forms.IsOptional{Default: "localhost:4444"}, forms.IsString{}, }, }, net.TCPRateLimitsField, { Name: "tls", Validators: []forms.Validator{ forms.IsStringMap{ Form: &tls.TLSSettingsForm, }, }, }, }, }
View Source
var MaxMessageSize = 1024 * 1024 * 4
currently we allow messages up to 4MB in size
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func MakeClient ¶
func (*Client) SendRequest ¶
type ClientAnnouncement ¶
type ClientAnnouncement struct {
Name string `json:"name"`
}
type ClientInfoAuthInfo ¶
type ClientInfoAuthInfo struct { credentials.AuthInfo ClientInfos *ClientInfos }
type ClientInfos ¶
type ClientInfos struct {
Infos []*hyper.ClientInfo
}
func MakeClientInfos ¶
func MakeClientInfos() *ClientInfos
func (*ClientInfos) ClientInfo ¶
func (c *ClientInfos) ClientInfo(name string) *hyper.ClientInfo
func (*ClientInfos) HasName ¶
func (c *ClientInfos) HasName(name string) bool
func (*ClientInfos) PrimaryName ¶
func (c *ClientInfos) PrimaryName() string
type ConnectedClient ¶
type ConnectedClient struct { CallServer protobuf.Hyper_ServerCallServer Stop chan bool Info *hyper.ClientInfo // contains filtered or unexported fields }
func (*ConnectedClient) DeliverRequest ¶
type GRPCClientSettings ¶
type GRPCClientSettings struct { TLS *tls.TLSSettings `json:"tls"` UseProxy bool `json:"useProxy"` Enabled bool `json:"enabled"` }
Settings for the gRPC client
type GRPCServerSettings ¶
type GRPCServerSettings struct { TLS *tls.TLSSettings `json:"tls"` BindAddress string `json:"bind_address"` TCPRateLimits []*net.RateLimit `json:"tcp_rate_limits"` Enabled bool `json:"enabled"` }
Settings for the gRPC server
type Server ¶
type Server struct { protobuf.UnimplementedHyperServer // contains filtered or unexported fields }
func MakeServer ¶
func (*Server) DeliverRequest ¶
func (*Server) ServerCall ¶
func (s *Server) ServerCall(server protobuf.Hyper_ServerCallServer) error
type VerifyCredentials ¶
type VerifyCredentials struct { credentials.TransportCredentials ClientInfos *ClientInfos // contains filtered or unexported fields }
func (VerifyCredentials) ClientHandshake ¶
func (VerifyCredentials) ServerHandshake ¶
func (c VerifyCredentials) ServerHandshake(conn net.Conn) (net.Conn, credentials.AuthInfo, error)
Click to show internal directories.
Click to hide internal directories.