rapi

package
v0.0.0-...-440f62f Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2015 License: MIT Imports: 2 Imported by: 2

Documentation

Overview

The rapi package contains the Go RPC method arguments and return values used by both the Forest Bus Server and Client implementations.

This package should not normally be used directly, instead please refer to the forestbus package for the library client.

Index

Constants

View Source
const (
	RI_SUCCESS int = iota
	RI_MISMATCHED_CLUSTER_ID
	RI_TOPIC_NOT_FOUND
	RI_INTERNAL_ERROR
	RI_NODE_NOT_LEADER
	RI_NODE_IN_SHUTDOWN
)

Variables

View Source
var ERR_TOPIC_NOT_FOUND = errors.New("Topic not found on server.")

Functions

This section is empty.

Types

type GetClusterDetailsArgs

type GetClusterDetailsArgs struct {
}

type GetClusterDetailsResults

type GetClusterDetailsResults struct {
	Result    ResultInfo
	ClusterID string
	Peers     []string
	Topics    []string
}

type GetTopicDetailsArgs

type GetTopicDetailsArgs struct {
	Topic string
}

type GetTopicDetailsResults

type GetTopicDetailsResults struct {
	Result      ResultInfo
	FirstIndex  int64
	LastIndex   int64
	CommitIndex int64
}

type ReceiveMessagesArgs

type ReceiveMessagesArgs struct {
	ClusterID       string
	Topic           string
	ID              int64
	Quantity        int
	WaitForMessages bool
}

type ReceiveMessagesResults

type ReceiveMessagesResults struct {
	Result           ResultInfo
	ReceivedMessages [][]byte
	NextID           int64
}

type ResultInfo

type ResultInfo struct {
	Code        int
	Description string
	Extra1      string
}

func Get_RI_INTERNAL_ERROR

func Get_RI_INTERNAL_ERROR(nodeName, errStr string, extra ...string) ResultInfo

func Get_RI_MISMATCHED_CLUSTER_ID

func Get_RI_MISMATCHED_CLUSTER_ID(nodeName, givenID, configuredID string) ResultInfo

func Get_RI_NODE_IN_SHUTDOWN

func Get_RI_NODE_IN_SHUTDOWN(nodeName string) ResultInfo

func Get_RI_NODE_NOT_LEADER

func Get_RI_NODE_NOT_LEADER(nodeName, actualLeader string) ResultInfo

func Get_RI_SUCCESS

func Get_RI_SUCCESS() ResultInfo

func Get_RI_TOPIC_NOT_FOUND

func Get_RI_TOPIC_NOT_FOUND(nodeName, givenTopic string) ResultInfo

type SendMessagesArgs

type SendMessagesArgs struct {
	ClusterID     string
	Topic         string
	SentMessages  [][]byte
	WaitForCommit bool
}

type SendMessagesResults

type SendMessagesResults struct {
	Result ResultInfo
	IDs    []int64
}

Jump to

Keyboard shortcuts

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