server

package
v0.0.0-...-1bf965b Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SessionOutput

type SessionOutput struct {
	streams.Result
	Header *headers.ResponseHeader
}

SessionOutput is a result for session-supporting servers containing session header information

type SessionizedServer

type SessionizedServer struct {
	Client node.Client
	Type   string
}

SessionizedServer is a base server for servers that support sessions

func (*SessionizedServer) CloseSession

CloseSession closes a session

func (*SessionizedServer) Command

func (s *SessionizedServer) Command(ctx context.Context, name string, input []byte, header *headers.RequestHeader) ([]byte, *headers.ResponseHeader, error)

Command submits a command to the service

func (*SessionizedServer) CommandStream

func (s *SessionizedServer) CommandStream(ctx context.Context, name string, input []byte, header *headers.RequestHeader, stream streams.WriteStream) error

CommandStream submits a streaming command to the service

func (*SessionizedServer) Delete

Delete deletes the service

func (*SessionizedServer) KeepAliveSession

func (s *SessionizedServer) KeepAliveSession(ctx context.Context, header *headers.RequestHeader) (*headers.ResponseHeader, error)

KeepAliveSession keeps a session alive

func (*SessionizedServer) OpenSession

func (s *SessionizedServer) OpenSession(ctx context.Context, header *headers.RequestHeader, timeout *time.Duration) (*headers.ResponseHeader, error)

OpenSession opens a new session

func (*SessionizedServer) Query

func (s *SessionizedServer) Query(ctx context.Context, name string, input []byte, header *headers.RequestHeader) ([]byte, *headers.ResponseHeader, error)

Query submits a query to the service

func (*SessionizedServer) QueryStream

func (s *SessionizedServer) QueryStream(ctx context.Context, name string, input []byte, header *headers.RequestHeader, stream streams.WriteStream) error

QueryStream submits a streaming query to the service

type SimpleServer

type SimpleServer struct {
	Client node.Client
	Type   string
}

SimpleServer is a base server for servers that do not support sessions

func (*SimpleServer) Command

func (s *SimpleServer) Command(ctx context.Context, name string, input []byte, header *headers.RequestHeader) ([]byte, *headers.ResponseHeader, error)

Command submits a command to the service

func (*SimpleServer) Delete

Delete deletes the service

func (*SimpleServer) Open

Open opens a simple session

func (*SimpleServer) Query

func (s *SimpleServer) Query(ctx context.Context, name string, input []byte, header *headers.RequestHeader) ([]byte, *headers.ResponseHeader, error)

Query submits a query to the service

Jump to

Keyboard shortcuts

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