Documentation ¶
Index ¶
- type AppManager
- type Client
- type ExternalDB
- type Machine
- type P2P
- type Server
- func (s *Server) ExecSQL(ctx context.Context, req *proto.ExecSQLRequest) (*proto.ExecSQLResponse, error)
- func (s *Server) GetAllCommits(context.Context, *proto.GetAllCommitsRequest) (*proto.GetAllCommitsResponse, error)
- func (s *Server) GetAppLogs(ctx context.Context, req *proto.GetAppLogsRequest) (*proto.GetAppLogsResponse, error)
- func (s *Server) GetAppStatus(ctx context.Context, req *proto.GetAppStatusRequest) (*proto.GetAppStatusResponse, error)
- func (s *Server) GetHead(context.Context, *proto.GetHeadRequest) (*proto.GetHeadResponse, error)
- func (s *Server) GetLogs(context.Context, *proto.GetLogsRequest) (*proto.GetLogsResponse, error)
- func (s *Server) GetPeers(context.Context, *proto.GetPeersRequest) (*proto.GetPeersResponse, error)
- func (s *Server) Init(ctx context.Context, req *proto.InitRequest) (*proto.InitResponse, error)
- func (s *Server) Ping(ctx context.Context, req *proto.PingRequest) (*proto.PingResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppManager ¶
type Client ¶
type Client struct { p2pproto.PingerClient p2pproto.PeerDBClient p2pproto.AppsClient p2pproto.InstanceClient // contains filtered or unexported fields }
Client is a remote p2p client
type ExternalDB ¶
type ExternalDB interface { AddPeer(peerID string, conn *grpc.ClientConn) error RemovePeer(peerID string) error GetAllCommits() ([]doltswarm.Commit, error) ExecAndCommit(execFunc doltswarm.ExecFunc, commitMsg string) (string, error) GetLastCommit(branch string) (doltswarm.Commit, error) InitFromPeer(peerID string) error EnableGRPCServers(server *grpc.Server) error Initialized() bool }
type P2P ¶
type P2P struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(key *pcrypto.Key, appManager AppManager, externalDB ExternalDB, p2pPort int) (*P2P, error)
NewManager creates and returns a new p2p manager
func (*P2P) ConfigurePeers ¶
ConfigurePeers configures all the peers passed as arguemnt
func (*P2P) RemovePeer ¶
func (*P2P) StartServer ¶
StartServer starts listening for p2p connections
type Server ¶
type Server struct { DB ExternalDB // contains filtered or unexported fields }
func (*Server) ExecSQL ¶
func (s *Server) ExecSQL(ctx context.Context, req *proto.ExecSQLRequest) (*proto.ExecSQLResponse, error)
func (*Server) GetAllCommits ¶
func (s *Server) GetAllCommits(context.Context, *proto.GetAllCommitsRequest) (*proto.GetAllCommitsResponse, error)
func (*Server) GetAppLogs ¶
func (s *Server) GetAppLogs(ctx context.Context, req *proto.GetAppLogsRequest) (*proto.GetAppLogsResponse, error)
func (*Server) GetAppStatus ¶
func (s *Server) GetAppStatus(ctx context.Context, req *proto.GetAppStatusRequest) (*proto.GetAppStatusResponse, error)
func (*Server) GetHead ¶
func (s *Server) GetHead(context.Context, *proto.GetHeadRequest) (*proto.GetHeadResponse, error)
func (*Server) GetLogs ¶
func (s *Server) GetLogs(context.Context, *proto.GetLogsRequest) (*proto.GetLogsResponse, error)
HandlerGetInstanceLogs retrieves logs for the local instance
func (*Server) GetPeers ¶
func (s *Server) GetPeers(context.Context, *proto.GetPeersRequest) (*proto.GetPeersResponse, error)
HandlerGetInstancePeers retrieves the peers for the local instance
func (*Server) Init ¶
func (s *Server) Init(ctx context.Context, req *proto.InitRequest) (*proto.InitResponse, error)
HandlerInit does the initialisation on the server side
func (*Server) Ping ¶
func (s *Server) Ping(ctx context.Context, req *proto.PingRequest) (*proto.PingResponse, error)
Click to show internal directories.
Click to hide internal directories.