atlas

package
v0.0.0-...-652cce4 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package atlas is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAtlasHandler

func RegisterAtlasHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterAtlasHandler registers the http handlers for service Atlas to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterAtlasHandlerClient

func RegisterAtlasHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AtlasClient) error

RegisterAtlasHandlerClient registers the http handlers for service Atlas to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AtlasClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AtlasClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AtlasClient" to call the correct interceptors.

func RegisterAtlasHandlerFromEndpoint

func RegisterAtlasHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterAtlasHandlerFromEndpoint is same as RegisterAtlasHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterAtlasServer

func RegisterAtlasServer(s *grpc.Server, srv AtlasServer)

Types

type AtlasClient

type AtlasClient interface {
	Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingReply, error)
	GetPlaylist(ctx context.Context, in *message.PlaylistRequest, opts ...grpc.CallOption) (*message.Playlist, error)
}

AtlasClient is the client API for Atlas service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewAtlasClient

func NewAtlasClient(cc *grpc.ClientConn) AtlasClient

type AtlasServer

type AtlasServer interface {
	Ping(context.Context, *PingRequest) (*PingReply, error)
	GetPlaylist(context.Context, *message.PlaylistRequest) (*message.Playlist, error)
}

AtlasServer is the server API for Atlas service.

type PingReply

type PingReply struct {
	Message              string   `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PingReply) Descriptor

func (*PingReply) Descriptor() ([]byte, []int)

func (*PingReply) GetMessage

func (m *PingReply) GetMessage() string

func (*PingReply) ProtoMessage

func (*PingReply) ProtoMessage()

func (*PingReply) Reset

func (m *PingReply) Reset()

func (*PingReply) String

func (m *PingReply) String() string

func (*PingReply) XXX_DiscardUnknown

func (m *PingReply) XXX_DiscardUnknown()

func (*PingReply) XXX_Marshal

func (m *PingReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PingReply) XXX_Merge

func (m *PingReply) XXX_Merge(src proto.Message)

func (*PingReply) XXX_Size

func (m *PingReply) XXX_Size() int

func (*PingReply) XXX_Unmarshal

func (m *PingReply) XXX_Unmarshal(b []byte) error

type PingRequest

type PingRequest struct {
	Message              string   `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PingRequest) Descriptor

func (*PingRequest) Descriptor() ([]byte, []int)

func (*PingRequest) GetMessage

func (m *PingRequest) GetMessage() string

func (*PingRequest) ProtoMessage

func (*PingRequest) ProtoMessage()

func (*PingRequest) Reset

func (m *PingRequest) Reset()

func (*PingRequest) String

func (m *PingRequest) String() string

func (*PingRequest) XXX_DiscardUnknown

func (m *PingRequest) XXX_DiscardUnknown()

func (*PingRequest) XXX_Marshal

func (m *PingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PingRequest) XXX_Merge

func (m *PingRequest) XXX_Merge(src proto.Message)

func (*PingRequest) XXX_Size

func (m *PingRequest) XXX_Size() int

func (*PingRequest) XXX_Unmarshal

func (m *PingRequest) XXX_Unmarshal(b []byte) error

type UnimplementedAtlasServer

type UnimplementedAtlasServer struct {
}

UnimplementedAtlasServer can be embedded to have forward compatible implementations.

func (*UnimplementedAtlasServer) GetPlaylist

func (*UnimplementedAtlasServer) Ping

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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