Documentation ¶
Index ¶
- Variables
- func NewRuntimeGoContext(ctx context.Context, values *RuntimeGoContextValues) context.Context
- func NewRuntimeGoLogger(logger *zap.Logger) nanaruntime.Logger
- func NewWebsocketAcceptor(c Configuration, metric metrics.Metrics) func(http.ResponseWriter, *http.Request)
- func NodeToHash(node string) [6]byte
- func Serve(ctx context.Context, c Configuration) error
- type ApiConfiguration
- type ApiServer
- type Configuration
- type Runtime
- type RuntimeAfterRtFunction
- type RuntimeBeforeRtFunction
- type RuntimeConfiguration
- type RuntimeGo
- type RuntimeGoContextValues
- type RuntimeGoInitializer
- func (ri *RuntimeGoInitializer) RegisterAfterRt(id string, ...) error
- func (ri *RuntimeGoInitializer) RegisterBeforeRt(id string, ...) error
- func (ri *RuntimeGoInitializer) RegisterEvent()
- func (ri *RuntimeGoInitializer) RegisterRpc(id string, ...) error
- func (r *RuntimeGoInitializer) Rpc(id string) (fn RuntimeRpcFunction, ok bool)
- type RuntimeGoLogger
- func (l *RuntimeGoLogger) Debug(format string, v ...interface{})
- func (l *RuntimeGoLogger) Error(format string, v ...interface{})
- func (l *RuntimeGoLogger) Fields() map[string]interface{}
- func (l *RuntimeGoLogger) Info(format string, v ...interface{})
- func (l *RuntimeGoLogger) Warn(format string, v ...interface{})
- func (l *RuntimeGoLogger) WithField(key string, v interface{}) nanaruntime.Logger
- func (l *RuntimeGoLogger) WithFields(fields map[string]interface{}) nanaruntime.Logger
- type RuntimeGoModule
- type RuntimeRpcFunction
- type RuntimeRpcValues
Constants ¶
This section is empty.
Variables ¶
View Source
var Shutdown = func() {}
退出程序
Functions ¶
func NewRuntimeGoContext ¶
func NewRuntimeGoContext(ctx context.Context, values *RuntimeGoContextValues) context.Context
func NewRuntimeGoLogger ¶
func NewRuntimeGoLogger(logger *zap.Logger) nanaruntime.Logger
func NewWebsocketAcceptor ¶
func NewWebsocketAcceptor(c Configuration, metric metrics.Metrics) func(http.ResponseWriter, *http.Request)
func NodeToHash ¶
Types ¶
type ApiConfiguration ¶
type ApiConfiguration struct { ServerKey string `yaml:"server_key" json:"server_key" usage:"Server key to use to establish a connection to the server."` Domain string `yaml:"domain" json:"domain" usage:"The domain for services address."` Port int `` /* 154-byte string literal not displayed */ Address string `` /* 156-byte string literal not displayed */ Protocol string `` /* 198-byte string literal not displayed */ MaxMessageSizeBytes int64 `` /* 186-byte string literal not displayed */ MaxRequestSizeBytes int64 `` /* 180-byte string literal not displayed */ ReadBufferSizeBytes int `` /* 136-byte string literal not displayed */ WriteBufferSizeBytes int `` /* 139-byte string literal not displayed */ ReadTimeoutMs int `` /* 145-byte string literal not displayed */ WriteTimeoutMs int `` /* 157-byte string literal not displayed */ IdleTimeoutMs int `` /* 178-byte string literal not displayed */ WriteWaitMs int `` /* 156-byte string literal not displayed */ PongWaitMs int `` /* 156-byte string literal not displayed */ PingPeriodMs int `` /* 204-byte string literal not displayed */ PingBackoffThreshold int `` /* 293-byte string literal not displayed */ OutgoingQueueSize int `` /* 245-byte string literal not displayed */ SSLCertificate string `` /* 192-byte string literal not displayed */ SSLPrivateKey string `` /* 192-byte string literal not displayed */ CertPEMBlock []byte `yaml:"-" json:"-"` // Created by fully reading the file contents of SSLCertificate, not set from input args directly. KeyPEMBlock []byte `yaml:"-" json:"-"` // Created by fully reading the file contents of SSLPrivateKey, not set from input args directly. TLSCert []tls.Certificate `yaml:"-" json:"-"` // Created by processing CertPEMBlock and KeyPEMBlock, not set from input args directly. }
func NewApiConfiguration ¶
func NewApiConfiguration() ApiConfiguration
type ApiServer ¶
type ApiServer struct { pb.UnimplementedLinnaServer // contains filtered or unexported fields }
func NewApiServer ¶
func (*ApiServer) SessionRefresh ¶
type Configuration ¶
type Configuration struct { Name string `yaml:"name" json:"name" usage:"Linna server’s node name - must be unique."` Config []string `yaml:"config" json:"config" usage:"The absolute file path to configuration YAML file."` Datadir string `yaml:"data_dir" json:"data_dir" usage:"An absolute path to a writeable folder where Linna will store its data."` Logger logger.Configuration `yaml:"log" json:"log" usage:"Logger levels and output."` Api ApiConfiguration `yaml:"api" json:"api" usage:"api server."` Metrics metrics.Configuration `yaml:"metrics" json:"metrics" usage:"Metrics settings."` Runtime RuntimeConfiguration `yaml:"runtime" json:"runtime" usage:"runtime settings."` Cluster cluster.Configuration `yaml:"cluster" json:"cluster" usage:"cluster settings."` CurrentPath string // contains filtered or unexported fields }
Configuration 配置
func NewConfiguration ¶
func NewConfiguration(log *zap.Logger) *Configuration
func ParseArgs ¶
func ParseArgs(log *zap.Logger, v, commitid, buildAt string, args []string) *Configuration
ParseArgs 参数解析
func (*Configuration) Parse ¶
func (c *Configuration) Parse() error
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
运行时
func NewRuntime ¶
type RuntimeAfterRtFunction ¶
type RuntimeBeforeRtFunction ¶
type RuntimeConfiguration ¶
type RuntimeConfiguration struct { Environment map[string]string `yaml:"-" json:"-"` Env []string `yaml:"env" json:"env" usage:"Values to pass into Runtime as environment variables."` Path string `yaml:"path" json:"path" usage:"Path for the server to scan for Go library files."` HTTPKey string `yaml:"http_key" json:"http_key" usage:"Runtime HTTP Invocation key."` }
运行时配置
func NewRuntimeConfiguration ¶
func NewRuntimeConfiguration() RuntimeConfiguration
type RuntimeGo ¶
type RuntimeGo struct {
// contains filtered or unexported fields
}
func NewRuntimeGo ¶
func (*RuntimeGo) GetInitializer ¶
func (r *RuntimeGo) GetInitializer() *RuntimeGoInitializer
func (*RuntimeGo) GetModule ¶
func (r *RuntimeGo) GetModule() *RuntimeGoModule
type RuntimeGoContextValues ¶
type RuntimeGoContextValues struct { *RuntimeRpcValues Env map[string]string Node string }
type RuntimeGoInitializer ¶
type RuntimeGoInitializer struct {
// contains filtered or unexported fields
}
go 注册器
func (*RuntimeGoInitializer) RegisterAfterRt ¶
func (*RuntimeGoInitializer) RegisterBeforeRt ¶
func (*RuntimeGoInitializer) RegisterEvent ¶
func (ri *RuntimeGoInitializer) RegisterEvent()
func (*RuntimeGoInitializer) RegisterRpc ¶
func (*RuntimeGoInitializer) Rpc ¶
func (r *RuntimeGoInitializer) Rpc(id string) (fn RuntimeRpcFunction, ok bool)
type RuntimeGoLogger ¶
type RuntimeGoLogger struct {
// contains filtered or unexported fields
}
func (*RuntimeGoLogger) Debug ¶
func (l *RuntimeGoLogger) Debug(format string, v ...interface{})
func (*RuntimeGoLogger) Error ¶
func (l *RuntimeGoLogger) Error(format string, v ...interface{})
func (*RuntimeGoLogger) Fields ¶
func (l *RuntimeGoLogger) Fields() map[string]interface{}
func (*RuntimeGoLogger) Info ¶
func (l *RuntimeGoLogger) Info(format string, v ...interface{})
func (*RuntimeGoLogger) Warn ¶
func (l *RuntimeGoLogger) Warn(format string, v ...interface{})
func (*RuntimeGoLogger) WithField ¶
func (l *RuntimeGoLogger) WithField(key string, v interface{}) nanaruntime.Logger
func (*RuntimeGoLogger) WithFields ¶
func (l *RuntimeGoLogger) WithFields(fields map[string]interface{}) nanaruntime.Logger
type RuntimeGoModule ¶
type RuntimeGoModule struct {
// contains filtered or unexported fields
}
func NewRuntimeGoModule ¶
func NewRuntimeGoModule(log *zap.Logger, db *sql.DB, metrics metrics.Metrics, c Configuration) *RuntimeGoModule
func (*RuntimeGoModule) AuthenticateEmail ¶
func (rm *RuntimeGoModule) AuthenticateEmail()
type RuntimeRpcFunction ¶
Click to show internal directories.
Click to hide internal directories.