Documentation ¶
Index ¶
- Constants
- Variables
- func NewDefaultModuleOption() objx.Map
- func NewDefaultObjectStreamOption() option.Option
- func ToModule(v **Module) func(string, interface{}) error
- func WrapHttpAuthContext(r *http.Request, ctx *SodaModuleAuthContext) error
- type Endpoint
- type FrameStream
- type GrpcModuleProxy
- type GrpcModuleProxyFactory
- type GrpcModuleServer
- type GrpcModuleServiceClientFactory
- type GrpcModuleServiceClientFactoryImpl
- type GrpcModuleWrapper
- type HttpAuthContextParser
- type Kernel
- func (k *Kernel) Config() *KernelConfig
- func (k *Kernel) Context() context.Context
- func (k *Kernel) GetObject(name string) (*deviced_pb.Object, error)
- func (k *Kernel) GetObjectContent(name string) ([]byte, error)
- func (k *Kernel) Heartbeat() error
- func (k *Kernel) ListObjects(name string, opt *ListObjectsOption) ([]*deviced_pb.Object, error)
- func (k *Kernel) NewFrameStream(flow string) (*FrameStream, error)
- func (k *Kernel) PushFrameToFlowOnce(name string, data interface{}, opt *PushFrameToFlowOnceOption) error
- func (k *Kernel) PutObject(name string, content io.Reader) error
- func (k *Kernel) PutObjectStreaming(name string, content io.ReadSeeker, opt *PutObjectStreamingOption) error
- func (k *Kernel) PutObjectStreamingWithCancel(name string, content io.ReadSeeker, opt *PutObjectStreamingOption) (cancel context.CancelFunc, errs chan error, err error)
- func (k *Kernel) PutObjects(objects map[string]io.Reader) error
- func (k *Kernel) RemoveObject(name string) error
- func (k *Kernel) RemoveObjects(names []string) error
- func (k *Kernel) RenameObject(src, dst string) error
- func (k *Kernel) Show() (*deviced_pb.Module, error)
- func (k *Kernel) ShowFirmwareDescriptor() (*deviced_pb.FirmwareDescriptor, error)
- type KernelConfig
- type KernelInterface
- type ListObjectsOption
- type Module
- func (m *Module) GetObject(name string) (*deviced_pb.Object, error)
- func (m *Module) GetObjectContent(name string) ([]byte, error)
- func (m *Module) HeartbeatLoop()
- func (m *Module) Init() error
- func (m *Module) IsRunning() bool
- func (m *Module) Kernel() *Kernel
- func (m *Module) Launch() error
- func (m *Module) Logger() *log.Entry
- func (m *Module) Name() string
- func (m *Module) PutObject(name string, content io.Reader) error
- func (m *Module) PutObjectStreaming(name string, content io.ReadSeeker, opt *PutObjectStreamingOption) error
- func (m *Module) PutObjectStreamingWithCancel(name string, content io.ReadSeeker, opt *PutObjectStreamingOption) (context.CancelFunc, chan error, error)
- func (m *Module) PutObjects(objects map[string]io.Reader) error
- func (m *Module) RawLogger() *log.Entry
- func (m *Module) RemoveObject(name string) error
- func (m *Module) RemoveObjects(names []string) error
- func (m *Module) RenameObject(src, dst string) error
- func (m *Module) Serve() error
- func (m *Module) Stop()
- func (m *Module) Target() interface{}
- func (m *Module) WithNamespace(name string) string
- type ModuleOption
- type ModuleProxy
- type ModuleProxyFactory
- type ModuleProxyStream
- type ModuleServer
- type ModuleServerFactory
- type ModuleServiceInitializer
- type ModuleServiceLookuper
- type MqttModuleProxy
- type MqttModuleProxyFactory
- type MqttModuleProxyOption
- type NewKernelOption
- type NewModuleOption
- type NewObjectStreamOption
- type ObjectStream
- type PushFrameToFlowOnceOption
- type PutObjectStreamingOption
- type ServiceEndpoint
- type SodaModuleAuthContext
- type SodaModuleAuthorizer
- func NewSodaModuleAuthorizer(name string, m *Module) (SodaModuleAuthorizer, error)
- func NewSodaModuleBasicAuthorizer(m *Module) (SodaModuleAuthorizer, error)
- func NewSodaModuleDummyAuthorizer(m *Module) (SodaModuleAuthorizer, error)
- func NewSodaModuleSecretAuthorizer(m *Module) (SodaModuleAuthorizer, error)
- type SodaModuleAuthorizerFactory
- type SodaModuleBackend
- type SodaModuleBackendFactory
- type SodaModuleBasicAuthorizer
- type SodaModuleDummyAuthorizer
- type SodaModuleHttpBackend
- type SodaModuleHttpWrapper
- type SodaModuleHttpWrapperFactory
- type SodaModuleSecretAuthorizer
- type SodaModuleServer
- type SodaModuleWrapper
- type SodaModuleWrapperFactory
- type TransportCredential
- type WriteObjectChunkOptions
Constants ¶
View Source
const ( STATE_SEEKABLE = "seekable" STATE_READABLE = "readable" STATE_WRITABLE = "writable" )
View Source
const ( OPTION_NAME = "name" OPTION_SHA1SUM = "sha1sum" OPTION_MAX_AGE = "maxAge" OPTION_OFFSET = "offset" OPTION_LENGTH = "length" OPTION_BUFFER_LENGTH = "bufferLength" OPTION_WAIT_TIMEOUT = "waitTimeout" )
View Source
const ( HTTP_SODA_OBJECT_STREAM_NAME = "Metathings-Soda-Object-Stream-Name" HTTP_SODA_OBJECT_SHA1SUM = "Metathings-Soda-Object-Sha1sum" HTTP_SODA_OBJECT_LENGTH = "Metathings-Soda-Object-Length" HTTP_SODA_OBJECT_UPLOADED_LENGTH = "Metathings-Soda-Object-Uploaded-Length" HTTP_SODA_OBJECT_STREAM_MAX_AGE = "Metathings-Soda-Object-Stream-Max-Age" HTTP_SODA_OBJECT_STREAM_REMAINED = "Metathings-Soda-Object-Stream-Remained" HTTP_SODA_OBJECT_STREAM_CHUNK_OFFSET = "Metathings-Soda-Object-Stream-Chunk-Offset" HTTP_SODA_OBJECT_STREAM_CHUNK_LENGTH = "Metathings-Soda-Object-Stream-Chunk-Length" HTTP_SODA_OBJECT_STREAM_CHUNK_SHA1SUM = "Metathings-Soda-Object-Stream-Chunk-Sha1sum" )
View Source
const (
METATHINGS_SODA_MODULE_CLIENT_USERAGENT = "Metathings-Soda-Module-Client"
)
Variables ¶
View Source
var ( ErrUnknownSodaModuleWrapperDriver = errors.New("unknown soda module wrapper driver") ErrUnknownSodaModuleBackendDriver = errors.New("unknown soda module backend driver") ErrUnknownSodaModuleAuthorizerDriver = errors.New("unknown soda module authorizer driver") ErrRequireSodaModuleAuthorizerSecret = errors.New("require soda module authorizer secret") ErrRequireSodaModuleAuthorizerUsername = errors.New("require soda module authorizer username") ErrRequireSodaModuleAuthorizerPassword = errors.New("require soda module authorizer password") ErrUnexpectedTokenFormat = errors.New("unexpected token format") ErrUnaryCallTimeout = errors.New("unary call timeout") ErrStreamCallConfigAckTimeout = errors.New("stream call config ack timeout") ErrStreamCallConfig = errors.New("stream call config error") ErrUnexceptedResponse = errors.New("unexpected response") ErrBadScheme = errors.New("bad scheme") ErrBadServiceEndpoint = errors.New("bad service endpoint") ErrDefaultAddressRequired = errors.New("default address required") ErrDeviceAddressRequired = errors.New("device address required") ErrInvalidArguments = errors.New("invalid arguments") ErrSubscribedSession = errors.New("subscribed session") ErrUnsubscribedSession = errors.New("unsubscribed session") ErrStartTimeout = errors.New("start timeout") ErrDownstreamNotFound = errors.New("downstream not found") ErrInvalidBuffer = errors.New("invalid buffer") ErrClosed = errors.New("closed") ErrWaitTimeout = errors.New("wait timeout") ErrUploadTimeout = errors.New("upload timeout") ErrSendOnClosedChannel = errors.New("send on closed channel") ErrUnregisteredState = errors.New("unregistered state") ErrUnmatchedChunkSha1sum = errors.New("unmatched chunk sha1sum") ErrPutObjectInProgressing = errors.New("put object in progressing") ErrObjectStreamFound = errors.New("object stream found") ErrObjectStreamNotFound = errors.New("object stream not found") ErrUnsupportedWhence, ErrUnsupportedWhenceFn = perrors.NewErrorAndErrorFunc[int]("unsupported whence") )
View Source
var ( MQTT_UPSTREAM = "upstream" MQTT_DOWNSTREAM = "downstream" )
View Source
var (
WithLogger, GetLogger = option_helper.WithLogger, option_helper.GetLogger
WithName, GetName = option.New[string](OPTION_NAME)
WithSha1sum, GetSha1sum = option.New[string](OPTION_SHA1SUM)
WithMaxAge, GetMaxAge = option.New[time.Duration](OPTION_MAX_AGE)
WithOffset, GetOffset = option.New[int64](OPTION_OFFSET)
WithLength, GetLength = option.New[int64](OPTION_LENGTH)
WithBufferLength, GetBufferLength = option.New[int64](OPTION_BUFFER_LENGTH)
WithWaitTimeout, GetWaitTimeout = option.New[time.Duration](OPTION_WAIT_TIMEOUT)
)
View Source
var (
ErrHandleUnimplemented = errors.New("handle unimplemented")
)
View Source
var (
ErrUnknownModuleProxyDriver = errors.New("unknown module proxy driver")
)
View Source
var (
ErrUnknownModuleServerAdapter = errors.New("unknown module server adapter")
)
Functions ¶
func NewDefaultModuleOption ¶ added in v1.2.0
func NewDefaultObjectStreamOption ¶
func NewDefaultObjectStreamOption() option.Option
func WrapHttpAuthContext ¶ added in v1.2.11
func WrapHttpAuthContext(r *http.Request, ctx *SodaModuleAuthContext) error
Types ¶
type Endpoint ¶ added in v1.0.0
func ParseEndpoint ¶ added in v1.0.0
func (*Endpoint) GetTransportProtocol ¶ added in v1.0.0
func (*Endpoint) IsMetathingsProtocol ¶ added in v1.0.0
type FrameStream ¶ added in v1.1.0
type FrameStream struct {
// contains filtered or unexported fields
}
func (*FrameStream) Close ¶ added in v1.1.0
func (fs *FrameStream) Close() error
func (*FrameStream) Push ¶ added in v1.1.0
func (fs *FrameStream) Push(dat interface{}) error
func (*FrameStream) PushFrame ¶ added in v1.1.0
func (fs *FrameStream) PushFrame(frm *deviced_pb.OpFrame) error
type GrpcModuleProxy ¶
type GrpcModuleProxy struct {
// contains filtered or unexported fields
}
func (*GrpcModuleProxy) Close ¶ added in v1.0.0
func (self *GrpcModuleProxy) Close() error
func (*GrpcModuleProxy) StreamCall ¶
func (self *GrpcModuleProxy) StreamCall(ctx context.Context, method string, upstm ModuleProxyStream) error
type GrpcModuleProxyFactory ¶
type GrpcModuleProxyFactory struct{}
func (*GrpcModuleProxyFactory) NewModuleProxy ¶
func (self *GrpcModuleProxyFactory) NewModuleProxy(args ...interface{}) (ModuleProxy, error)
type GrpcModuleServer ¶
type GrpcModuleServer struct {
// contains filtered or unexported fields
}
func (*GrpcModuleServer) Serve ¶
func (s *GrpcModuleServer) Serve() error
func (*GrpcModuleServer) Stop ¶
func (s *GrpcModuleServer) Stop()
type GrpcModuleServiceClientFactory ¶
type GrpcModuleServiceClientFactory interface {
NewModuleServiceClient(opts ...grpc.DialOption) (pb.ModuleServiceClient, client_helper.DoneFn, error)
}
func NewGrpcModuleServiceClientFactory ¶
func NewGrpcModuleServiceClientFactory(addr string) GrpcModuleServiceClientFactory
type GrpcModuleServiceClientFactoryImpl ¶
type GrpcModuleServiceClientFactoryImpl struct {
Address string
}
func (*GrpcModuleServiceClientFactoryImpl) NewModuleServiceClient ¶
func (self *GrpcModuleServiceClientFactoryImpl) NewModuleServiceClient(opts ...grpc.DialOption) (pb.ModuleServiceClient, client_helper.DoneFn, error)
type GrpcModuleWrapper ¶
type GrpcModuleWrapper struct { pb.UnimplementedModuleServiceServer // contains filtered or unexported fields }
func NewGrpcModuleWrapper ¶
func NewGrpcModuleWrapper(target interface{}, logger log.FieldLogger) *GrpcModuleWrapper
func (*GrpcModuleWrapper) StreamCall ¶
func (self *GrpcModuleWrapper) StreamCall(upstm pb.ModuleService_StreamCallServer) error
func (*GrpcModuleWrapper) UnaryCall ¶
func (self *GrpcModuleWrapper) UnaryCall(ctx context.Context, req *pb.UnaryCallRequest) (*pb.UnaryCallResponse, error)
type HttpAuthContextParser ¶ added in v1.2.9
type HttpAuthContextParser func(*http.Request) (*SodaModuleAuthContext, error)
type Kernel ¶
type Kernel struct {
// contains filtered or unexported fields
}
func NewKernel ¶
func NewKernel(opt *NewKernelOption) (*Kernel, error)
func (*Kernel) Config ¶
func (k *Kernel) Config() *KernelConfig
func (*Kernel) ListObjects ¶ added in v1.2.9
func (k *Kernel) ListObjects(name string, opt *ListObjectsOption) ([]*deviced_pb.Object, error)
func (*Kernel) NewFrameStream ¶ added in v1.1.0
func (k *Kernel) NewFrameStream(flow string) (*FrameStream, error)
func (*Kernel) PushFrameToFlowOnce ¶ added in v1.2.9
func (k *Kernel) PushFrameToFlowOnce(name string, data interface{}, opt *PushFrameToFlowOnceOption) error
func (*Kernel) PutObjectStreaming ¶ added in v1.1.16
func (k *Kernel) PutObjectStreaming(name string, content io.ReadSeeker, opt *PutObjectStreamingOption) error
func (*Kernel) PutObjectStreamingWithCancel ¶ added in v1.1.16
func (k *Kernel) PutObjectStreamingWithCancel(name string, content io.ReadSeeker, opt *PutObjectStreamingOption) (cancel context.CancelFunc, errs chan error, err error)
func (*Kernel) RemoveObject ¶
func (*Kernel) RemoveObjects ¶
func (*Kernel) RenameObject ¶
func (*Kernel) ShowFirmwareDescriptor ¶ added in v1.2.0
func (k *Kernel) ShowFirmwareDescriptor() (*deviced_pb.FirmwareDescriptor, error)
type KernelConfig ¶
func NewKernelConfigFromText ¶
func NewKernelConfigFromText(text string) (*KernelConfig, error)
func (*KernelConfig) Raw ¶
func (kc *KernelConfig) Raw() *viper.Viper
func (*KernelConfig) Sub ¶
func (kc *KernelConfig) Sub(key string) *KernelConfig
type KernelInterface ¶ added in v1.2.9
type KernelInterface interface { Context() context.Context Show() (*deviced_pb.Module, error) ShowFirmwareDescriptor() (*deviced_pb.FirmwareDescriptor, error) PutObject(name string, content io.Reader) error PutObjectStreaming(name string, content io.ReadSeeker, opt *PutObjectStreamingOption) error PutObjectStreamingWithCancel(name string, content io.ReadSeeker, opt *PutObjectStreamingOption) (context.CancelFunc, chan error, error) PutObjects(objects map[string]io.Reader) error GetObject(name string) (*deviced_pb.Object, error) GetObjectContent(name string) ([]byte, error) RemoveObjct(name string) error RemoveObjets(names []string) error RenameObject(src, dst string) error PushFrameToFlowOnce(name string, data interface{}, opt *PushFrameToFlowOnceOption) error Heartbeat() error }
type ListObjectsOption ¶ added in v1.2.9
type Module ¶
type Module struct { version_helper.Versioner // contains filtered or unexported fields }
func NewModule ¶
func NewModule(opts ...NewModuleOption) (*Module, error)
func (*Module) HeartbeatLoop ¶
func (m *Module) HeartbeatLoop()
func (*Module) PutObjectStreaming ¶ added in v1.1.16
func (m *Module) PutObjectStreaming(name string, content io.ReadSeeker, opt *PutObjectStreamingOption) error
func (*Module) PutObjectStreamingWithCancel ¶ added in v1.1.16
func (m *Module) PutObjectStreamingWithCancel(name string, content io.ReadSeeker, opt *PutObjectStreamingOption) (context.CancelFunc, chan error, error)
func (*Module) RemoveObject ¶
func (*Module) RemoveObjects ¶
func (*Module) RenameObject ¶
func (*Module) WithNamespace ¶
type ModuleOption ¶
type ModuleOption struct { Config string CredentialId string CredentialSecret string ServiceEndpoints map[string]ServiceEndpoint TransportCredential TransportCredential }
type ModuleProxy ¶
type ModuleProxy interface { UnaryCall(ctx context.Context, method string, req *any.Any) (*any.Any, error) StreamCall(ctx context.Context, method string, stm ModuleProxyStream) error Close() error }
func NewModuleProxy ¶
func NewModuleProxy(name string, args ...interface{}) (ModuleProxy, error)
type ModuleProxyFactory ¶
type ModuleProxyFactory interface {
NewModuleProxy(args ...interface{}) (ModuleProxy, error)
}
type ModuleProxyStream ¶
type ModuleProxyStream interface { Send(*any.Any) error Recv() (*any.Any, error) grpc.ClientStream }
func NewModuleProxyStream ¶
func NewModuleProxyStream(stm deviced_pb.DevicedService_ConnectClient, session int64) ModuleProxyStream
type ModuleServer ¶
type ModuleServer interface { Stop() Serve() error }
func NewGrpcModuleServer ¶
func NewGrpcModuleServer(m *Module) (ModuleServer, error)
func NewModuleServer ¶
func NewModuleServer(name string, mdl *Module) (ModuleServer, error)
func NewSodaModuleServer ¶ added in v1.2.9
func NewSodaModuleServer(m *Module) (ModuleServer, error)
type ModuleServerFactory ¶
type ModuleServerFactory func(*Module) (ModuleServer, error)
type ModuleServiceLookuper ¶
type ModuleServiceLookuper interface { LookupUnaryCall() LookupStreamCall() }
type MqttModuleProxy ¶ added in v1.0.0
type MqttModuleProxy struct {
// contains filtered or unexported fields
}
func (*MqttModuleProxy) Close ¶ added in v1.0.0
func (p *MqttModuleProxy) Close() error
func (*MqttModuleProxy) StreamCall ¶ added in v1.0.0
func (p *MqttModuleProxy) StreamCall(ctx context.Context, method string, upstm ModuleProxyStream) error
type MqttModuleProxyFactory ¶ added in v1.0.0
type MqttModuleProxyFactory struct{}
func (*MqttModuleProxyFactory) NewModuleProxy ¶ added in v1.0.0
func (f *MqttModuleProxyFactory) NewModuleProxy(args ...interface{}) (ModuleProxy, error)
type MqttModuleProxyOption ¶ added in v1.0.0
type MqttModuleProxyOption struct { Module struct { Id string } Session struct { Id int64 } Config struct { UnaryCallTimeout time.Duration StreamCallConfigAckTimeout time.Duration MQTTConnectTimeout time.Duration MQTTDisconnectTimeout time.Duration } MQTT struct { Address string Username string Password string ClientId string QoS byte } }
type NewKernelOption ¶
type NewKernelOption struct { Credential struct { Id string Secret string } TransportCredential TransportCredential ServiceEndpoints map[string]ServiceEndpoint ConfigText string }
type NewModuleOption ¶ added in v1.2.0
func SetArgs ¶ added in v1.2.9
func SetArgs(vs []string) NewModuleOption
func SetTarget ¶ added in v1.2.9
func SetTarget(v interface{}) NewModuleOption
func SetVersion ¶ added in v1.2.0
func SetVersion(v string) NewModuleOption
type NewObjectStreamOption ¶
type NewObjectStreamOption = option.ApplyOption
type ObjectStream ¶
type ObjectStream interface { Name() string Sha1sum() string MaxAge() time.Duration Remained() time.Duration Length() int64 BufferLength() int64 Uploaded() int64 Wait(string) error Offset() int64 io.Writer io.Reader io.Seeker io.Closer CloseWithError(error) error }
func NewObjectStream ¶
func NewObjectStream(opts ...NewObjectStreamOption) (ObjectStream, error)
type PushFrameToFlowOnceOption ¶ added in v1.2.9
type PutObjectStreamingOption ¶ added in v1.1.16
func NewPutObjectStreamingOptionFromPath ¶ added in v1.1.16
func NewPutObjectStreamingOptionFromPath(path string) (*PutObjectStreamingOption, error)
type ServiceEndpoint ¶ added in v1.1.10
type ServiceEndpoint struct { TransportCredential `mapstructure:",squash"` Address string }
type SodaModuleAuthContext ¶ added in v1.2.9
func ParseHttpAuthContext ¶ added in v1.2.9
func ParseHttpAuthContext(name string, r *http.Request) (*SodaModuleAuthContext, error)
type SodaModuleAuthorizer ¶ added in v1.2.9
type SodaModuleAuthorizer interface { Sign(*SodaModuleAuthContext) (*SodaModuleAuthContext, error) Verify(*SodaModuleAuthContext) error }
func NewSodaModuleAuthorizer ¶ added in v1.2.9
func NewSodaModuleAuthorizer(name string, m *Module) (SodaModuleAuthorizer, error)
func NewSodaModuleBasicAuthorizer ¶ added in v1.2.11
func NewSodaModuleBasicAuthorizer(m *Module) (SodaModuleAuthorizer, error)
func NewSodaModuleDummyAuthorizer ¶ added in v1.2.9
func NewSodaModuleDummyAuthorizer(m *Module) (SodaModuleAuthorizer, error)
func NewSodaModuleSecretAuthorizer ¶ added in v1.2.9
func NewSodaModuleSecretAuthorizer(m *Module) (SodaModuleAuthorizer, error)
type SodaModuleAuthorizerFactory ¶ added in v1.2.9
type SodaModuleAuthorizerFactory func(*Module) (SodaModuleAuthorizer, error)
type SodaModuleBackend ¶ added in v1.2.9
type SodaModuleBackend interface { Start() error Stop() error Done() <-chan struct{} Health() error }
func NewSodaModuleBackend ¶ added in v1.2.9
func NewSodaModuleBackend(name string, mdl *Module) (SodaModuleBackend, error)
func NewSodaModuleHttpBackend ¶ added in v1.2.9
func NewSodaModuleHttpBackend(m *Module) (SodaModuleBackend, error)
type SodaModuleBackendFactory ¶ added in v1.2.9
type SodaModuleBackendFactory func(*Module) (SodaModuleBackend, error)
type SodaModuleBasicAuthorizer ¶ added in v1.2.11
type SodaModuleBasicAuthorizer struct {
// contains filtered or unexported fields
}
func (*SodaModuleBasicAuthorizer) Sign ¶ added in v1.2.11
func (a *SodaModuleBasicAuthorizer) Sign(ctx *SodaModuleAuthContext) (*SodaModuleAuthContext, error)
func (*SodaModuleBasicAuthorizer) Verify ¶ added in v1.2.11
func (a *SodaModuleBasicAuthorizer) Verify(ctx *SodaModuleAuthContext) error
type SodaModuleDummyAuthorizer ¶ added in v1.2.9
type SodaModuleDummyAuthorizer struct{}
func (*SodaModuleDummyAuthorizer) Sign ¶ added in v1.2.11
func (*SodaModuleDummyAuthorizer) Sign(*SodaModuleAuthContext) (*SodaModuleAuthContext, error)
func (*SodaModuleDummyAuthorizer) Verify ¶ added in v1.2.11
func (*SodaModuleDummyAuthorizer) Verify(*SodaModuleAuthContext) error
type SodaModuleHttpBackend ¶ added in v1.2.9
type SodaModuleHttpBackend struct {
// contains filtered or unexported fields
}
func (*SodaModuleHttpBackend) Done ¶ added in v1.2.9
func (b *SodaModuleHttpBackend) Done() <-chan struct{}
func (*SodaModuleHttpBackend) Health ¶ added in v1.2.9
func (b *SodaModuleHttpBackend) Health() error
func (*SodaModuleHttpBackend) Start ¶ added in v1.2.9
func (b *SodaModuleHttpBackend) Start() error
func (*SodaModuleHttpBackend) Stop ¶ added in v1.2.9
func (b *SodaModuleHttpBackend) Stop() error
type SodaModuleHttpWrapper ¶ added in v1.2.9
type SodaModuleHttpWrapper struct { pb.UnimplementedModuleServiceServer // contains filtered or unexported fields }
func (*SodaModuleHttpWrapper) Logger ¶
func (w *SodaModuleHttpWrapper) Logger() *log.Entry
func (*SodaModuleHttpWrapper) StreamCall ¶ added in v1.2.9
func (w *SodaModuleHttpWrapper) StreamCall(upstm pb.ModuleService_StreamCallServer) error
func (*SodaModuleHttpWrapper) UnaryCall ¶ added in v1.2.9
func (w *SodaModuleHttpWrapper) UnaryCall(ctx context.Context, req *pb.UnaryCallRequest) (*pb.UnaryCallResponse, error)
type SodaModuleHttpWrapperFactory ¶ added in v1.2.9
type SodaModuleHttpWrapperFactory struct{}
func (*SodaModuleHttpWrapperFactory) NewModuleWrapper ¶ added in v1.2.9
func (f *SodaModuleHttpWrapperFactory) NewModuleWrapper(m *Module) (SodaModuleWrapper, error)
type SodaModuleSecretAuthorizer ¶ added in v1.2.9
type SodaModuleSecretAuthorizer struct {
// contains filtered or unexported fields
}
func (*SodaModuleSecretAuthorizer) Sign ¶ added in v1.2.11
func (a *SodaModuleSecretAuthorizer) Sign(ctx *SodaModuleAuthContext) (*SodaModuleAuthContext, error)
func (*SodaModuleSecretAuthorizer) Verify ¶ added in v1.2.11
func (a *SodaModuleSecretAuthorizer) Verify(ctx *SodaModuleAuthContext) error
type SodaModuleServer ¶ added in v1.2.9
type SodaModuleServer struct {
// contains filtered or unexported fields
}
func (*SodaModuleServer) Serve ¶ added in v1.2.9
func (s *SodaModuleServer) Serve() error
func (*SodaModuleServer) Start ¶ added in v1.2.9
func (s *SodaModuleServer) Start() error
func (*SodaModuleServer) Stop ¶ added in v1.2.9
func (s *SodaModuleServer) Stop()
func (*SodaModuleServer) Wait ¶ added in v1.2.9
func (s *SodaModuleServer) Wait()
type SodaModuleWrapper ¶ added in v1.2.9
type SodaModuleWrapper interface { pb.ModuleServiceServer }
func NewSodaModuleWrapper ¶ added in v1.2.9
func NewSodaModuleWrapper(m *Module) (SodaModuleWrapper, error)
type SodaModuleWrapperFactory ¶ added in v1.2.9
type SodaModuleWrapperFactory interface {
NewModuleWrapper(*Module) (SodaModuleWrapper, error)
}
type TransportCredential ¶ added in v1.1.10
type WriteObjectChunkOptions ¶
Source Files ¶
- errors.go
- grpc_module_proxy.go
- grpc_module_server.go
- grpc_module_wrapper.go
- helper.go
- kernel.go
- module.go
- module_proxy.go
- module_server.go
- mqtt_module_proxy.go
- object_stream.go
- option.go
- soda_module_authorizer.go
- soda_module_backend.go
- soda_module_basic_authorizer.go
- soda_module_dummy_authorizer.go
- soda_module_http_backend.go
- soda_module_http_wrapper.go
- soda_module_proxy.go
- soda_module_secret_authorizer.go
- soda_module_server.go
- soda_module_wrapper.go
Click to show internal directories.
Click to hide internal directories.