Documentation
¶
Index ¶
- Constants
- func SingleSessionServerStart(protocol, address string, wrapper *SingleSessionServer) error
- type PomogoClient
- type PomogoSessionServer
- type SClientFuncOpt
- type SServerFuncOpt
- func SingleServerContainerOpt(factory func() *pomoController.SingleControllerContainer) SServerFuncOpt
- func SingleServerRpcRegisterOpt(protocol, address string, serverFactory func() *rpc.Server, ...) SServerFuncOpt
- func SingleServerRpcUnixRegOpt(address string, serverFactory func() *rpc.Server, ...) SServerFuncOpt
- type SessionWrapper
- func (sw *SessionWrapper) Pause(request struct{}, reply *pomoController.PomoControllerStatus) error
- func (sw *SessionWrapper) Play(request struct{}, reply *pomoController.PomoControllerStatus) error
- func (sw *SessionWrapper) Skip(request struct{}, reply *pomoController.PomoControllerStatus) error
- func (sw *SessionWrapper) Status(request struct{}, reply *pomoController.PomoControllerStatus) error
- func (sw *SessionWrapper) Stop(request struct{}, reply *pomoController.PomoControllerStatus) error
- type SingleSessionClient
- type SingleSessionServer
- func (c *SingleSessionServer) Pause(request struct{}, reply *pomoController.PomoControllerStatus) error
- func (c *SingleSessionServer) Play(request struct{}, reply *pomoController.PomoControllerStatus) error
- func (c *SingleSessionServer) Skip(request struct{}, reply *pomoController.PomoControllerStatus) error
- func (c *SingleSessionServer) Status(request struct{}, reply *pomoController.PomoControllerStatus) error
- func (c *SingleSessionServer) Stop(request struct{}, reply *pomoController.PomoControllerStatus) error
Constants ¶
View Source
const (
DefaultServerName = "SingleSessionServer"
)
Variables ¶
This section is empty.
Functions ¶
func SingleSessionServerStart ¶
func SingleSessionServerStart(protocol, address string, wrapper *SingleSessionServer) error
Given a server start listening listening synchronously
Types ¶
type PomogoClient ¶
type PomogoSessionServer ¶
type PomogoSessionServer interface {
Status(
request struct{},
reply *pomoController.PomoControllerStatus,
) error
Pause(
request struct{},
reply *pomoController.PomoControllerStatus,
) error
Play(
request struct{},
reply *pomoController.PomoControllerStatus,
) error
Skip(
request struct{},
reply *pomoController.PomoControllerStatus,
) error
Stop(
request struct{},
reply *pomoController.PomoControllerStatus,
) error
}
type SClientFuncOpt ¶
type SClientFuncOpt func(*SingleSessionClient) (SClientFuncOpt, error)
func SingleClientRpcHttpConnect ¶
func SingleClientRpcHttpConnect(protocol, address string) SClientFuncOpt
Connect to http-rpc server.
type SServerFuncOpt ¶
type SServerFuncOpt func(*SingleSessionServer) (SServerFuncOpt, error)
func SingleServerContainerOpt ¶
func SingleServerContainerOpt( factory func() *pomoController.SingleControllerContainer, ) SServerFuncOpt
Set controller container given a factory function.
type SessionWrapper ¶
type SessionWrapper struct {
// contains filtered or unexported fields
}
func (*SessionWrapper) Pause ¶
func (sw *SessionWrapper) Pause( request struct{}, reply *pomoController.PomoControllerStatus, ) error
func (*SessionWrapper) Play ¶
func (sw *SessionWrapper) Play( request struct{}, reply *pomoController.PomoControllerStatus, ) error
func (*SessionWrapper) Skip ¶
func (sw *SessionWrapper) Skip( request struct{}, reply *pomoController.PomoControllerStatus, ) error
func (*SessionWrapper) Status ¶
func (sw *SessionWrapper) Status( request struct{}, reply *pomoController.PomoControllerStatus, ) error
func (*SessionWrapper) Stop ¶
func (sw *SessionWrapper) Stop( request struct{}, reply *pomoController.PomoControllerStatus, ) error
type SingleSessionClient ¶
type SingleSessionClient struct {
// contains filtered or unexported fields
}
Direct wrapper around the client. The lifecycle of the object should not be longer than the connection:
func PomogoRpcClientFactory ¶
func PomogoRpcClientFactory(protocol, address string) (*SingleSessionClient, error)
Initializes rpc client and returns wrapper
func SingleSessionClientFactory ¶
func SingleSessionClientFactory(options ...SClientFuncOpt) (*SingleSessionClient, error)
Create single session rpc client and run it through every option
func (*SingleSessionClient) Pause ¶
func (c *SingleSessionClient) Pause() (*pomoStatus, error)
func (*SingleSessionClient) Play ¶
func (c *SingleSessionClient) Play() (*pomoStatus, error)
func (*SingleSessionClient) Skip ¶
func (c *SingleSessionClient) Skip() (*pomoStatus, error)
func (*SingleSessionClient) Status ¶
func (c *SingleSessionClient) Status() (*pomoStatus, error)
func (*SingleSessionClient) Stop ¶
func (c *SingleSessionClient) Stop() (*pomoStatus, error)
type SingleSessionServer ¶
type SingleSessionServer struct {
// contains filtered or unexported fields
}
LIFECYCLE MANAGEMENT OF CONTROLLER. It may be better to skip the container step and manage the lifecycle directly from the server object.
func SingleSessionServerFactory ¶
func SingleSessionServerFactory(options ...SServerFuncOpt) (*SingleSessionServer, error)
Creates a new *SingleSessionServer reference and runs it through every option.
func (*SingleSessionServer) Pause ¶
func (c *SingleSessionServer) Pause( request struct{}, reply *pomoController.PomoControllerStatus, ) error
func (*SingleSessionServer) Play ¶
func (c *SingleSessionServer) Play( request struct{}, reply *pomoController.PomoControllerStatus, ) error
CREATE NEW INSTANCE AND START CONTROLLER COUNTING.
func (*SingleSessionServer) Skip ¶
func (c *SingleSessionServer) Skip( request struct{}, reply *pomoController.PomoControllerStatus, ) error
func (*SingleSessionServer) Status ¶
func (c *SingleSessionServer) Status( request struct{}, reply *pomoController.PomoControllerStatus, ) error
func (*SingleSessionServer) Stop ¶
func (c *SingleSessionServer) Stop( request struct{}, reply *pomoController.PomoControllerStatus, ) error
Click to show internal directories.
Click to hide internal directories.