Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TaskToProto

func TaskToProto(task *bokchoy.Task) *proto.Task

Types

type Client

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

func NewClient

func NewClient(addr string, options ClientOptions) *Client

    NewClient initializes a new rpc client.

    func (*Client) PublishTask

    func (c *Client) PublishTask(ctx context.Context, queueName string, payload []byte) (*proto.Task, error)

    type ClientOptions

    type ClientOptions struct {
    	MaxRetries      uint
    	PerRetryTimeout time.Duration
    	RetryCodes      []codes.Code
    }

    type Handler

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

    func (Handler) PublishTask

    func (h Handler) PublishTask(ctx context.Context, req *proto.PublishTaskRequest) (*proto.Task, error)

    type Server

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

      Server is a rpc server which contains gRPC.

      func NewServer

      func NewServer(bok *bokchoy.Bokchoy, port int) *Server

        NewServer initializes a new Server.

        func (*Server) Start

        func (s *Server) Start(ctx context.Context) error

          Start starts the RPC server.

          func (*Server) Stop

          func (s *Server) Stop(ctx context.Context)

            Stop stops the RPC server.

            func (*Server) String

            func (s *Server) String() string

            Directories

            Path Synopsis