switchback

package
v0.0.0-...-ce12b60 Latest Latest
Warning

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

Go to latest
Published: May 1, 2022 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VersionMajor   = 0
	VersionMinor   = 1
	VersionPatch   = 0
	VersionRelease = 0
)

Variables

This section is empty.

Functions

func Version

func Version() string

Types

type Consumer

type Consumer struct {
	// contains filtered or unexported fields
}

type Group

type Group struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*Group) Publish

func (g *Group) Publish(event *api.Event) (err error)

type PubSub

type PubSub struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*PubSub) Connect

func (p *PubSub) Connect(sub *api.Subscription) (<-chan *api.Event, error)

func (*PubSub) Publish

func (p *PubSub) Publish(event *api.Event) (err error)

type Server

type Server struct {
	api.UnimplementedSwitchbackServer
	// contains filtered or unexported fields
}

func New

func New(conf config.Config) (s *Server, err error)

func (*Server) Publish

func (s *Server) Publish(stream api.Switchback_PublishServer) (err error)

func (*Server) Run

func (s *Server) Run(sock net.Listener)

func (*Server) Serve

func (s *Server) Serve() (err error)

func (*Server) Shutdown

func (s *Server) Shutdown() (err error)

func (*Server) Status

func (s *Server) Status(ctx context.Context, in *api.HealthCheck) (out *api.ServiceState, err error)

func (*Server) StreamAvailable

func (s *Server) StreamAvailable() grpc.StreamServerInterceptor

StreamAvailable returns an interceptor that should be first in the chain - returning an error if the server is in maintenance mode (unless a status request is sent).

func (*Server) StreamInterceptors

func (s *Server) StreamInterceptors() grpc.ServerOption

func (*Server) Subscribe

func (s *Server) Subscribe(in *api.Subscription, stream api.Switchback_SubscribeServer) (err error)

func (*Server) UnaryAvailable

func (s *Server) UnaryAvailable() grpc.UnaryServerInterceptor

UnaryAvailable returns an interceptor that should be first in the chain - returning an error if the server is in maintenance mode (unless a status request is sent).

func (*Server) UnaryInterceptors

func (s *Server) UnaryInterceptors() grpc.ServerOption

Directories

Path Synopsis
api
v1

Jump to

Keyboard shortcuts

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