rpc

package
v0.0.0-...-6f440d7 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: LGPL-2.1 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Port     string           `yaml:"port"`
	CertFile string           `yaml:"cert"`
	KeyFile  string           `yaml:"key"`
	Redis    *redis.Connector `yaml:"redis"`
	Gcal     string           `yaml:"gcalUrl"`
	// contains filtered or unexported fields
}

Server - the rpc server object

func (*Server) DeleteEvent

func (srv *Server) DeleteEvent(ctx context.Context, in *rpc.String) (*rpc.Generic, error)

DeleteEvent performs event delete in google.

func (*Server) HandleGeneric

func (srv *Server) HandleGeneric(ctx context.Context, in *rpc.Generic) (*rpc.Generic, error)

HandleGeneric responds to generic requests

func (*Server) ProcessRequests

func (srv *Server) ProcessRequests(client rpc.TipFlyvo_ProcessRequestsServer) error

ProcessRequests processes requests from web clients. I.e. the rpc server stocks up web client requests, and the rpc client retrieves and processes them, and the response from the rpc client is proxied back to web client. NOTE: This function is called remotely from the RPC client.

func (*Server) PublishEvent

func (srv *Server) PublishEvent(ctx context.Context, in *rpc.Event) (*rpc.Generic, error)

PublishEvent publishes event to google.

func (*Server) RemoveFromEvent

func (srv *Server) RemoveFromEvent(ctx context.Context, in *rpc.String) (*rpc.Generic, error)

RemoveFromEvent performs event delete in google.

func (*Server) Run

func (srv *Server) Run(ctx context.Context)

Run - starts the web api

func (*Server) UpdateEvent

func (srv *Server) UpdateEvent(ctx context.Context, in *rpc.Event) (*rpc.Generic, error)

UpdateEvent updates event in google

func (*Server) WaitForClientsideProcessing

func (srv *Server) WaitForClientsideProcessing(
	g *rpc.Generic,
	timeout time.Duration,
) (
	rpc.Generic,
	error,
)

WaitForClientsideProcessing - Publish a request and wait for a response from the client if timeout duration is passed, the request is canceled and an errorAndClose is returned.

Jump to

Keyboard shortcuts

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