server

package
v0.0.0-...-03a7547 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2017 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy

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

Proxy acts as a proxy for an existing Jocko server It forwards requests to server over provided connection and returns server response to caller

func NewProxy

func NewProxy(conn io.ReadWriter) *Proxy

NewProxy creates a new proxy to a Jocko server that can be reached over conn

func (*Proxy) CreateTopic

func (p *Proxy) CreateTopic(clientID string, createRequest *protocol.CreateTopicRequest) (*protocol.CreateTopicsResponse, error)

CreateTopic sends request to server to create a topic as per createRequest

func (*Proxy) FetchMessages

func (p *Proxy) FetchMessages(clientID string, fetchRequest *protocol.FetchRequest) (*protocol.FetchResponses, error)

FetchMessages of topics from server as per fetchRequest

type Server

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

func New

func New(addr string, broker jocko.Broker, logger *simplelog.Logger) *Server

func (*Server) Addr

func (s *Server) Addr() net.Addr

Addr returns the address on which the Server is listening

func (*Server) Close

func (s *Server) Close()

Close closes the service.

func (*Server) Start

func (s *Server) Start() error

Start starts the service.

Jump to

Keyboard shortcuts

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